diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DepositPage.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DepositPage.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx index d4759c537..5c931394d 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx @@ -108,8 +108,13 @@ export function View({ const currency = balance.currency; const amountStr: AmountString = `${currency}:${amount}`; - const account = knownBankAccounts[accountIdx]; - const accountURI = `payto://${account.targetType}/${account.targetPath}`; + const account = knownBankAccounts.length + ? knownBankAccounts[accountIdx] + : undefined; + const accountURI = !account + ? "" + : `payto://${account.targetType}/${account.targetPath}`; + useEffect(() => { if (amount === undefined) return; onCalculateFee(accountURI, amountStr).then((result) => { |