From 9f8139e09b21ec12f9b9ba4926ea80557698c559 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 4 Jan 2022 17:06:17 -0300
Subject: replace jest with mocha

---
 packages/taler-wallet-webextension/src/wallet/DepositPage.tsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/wallet/DepositPage.tsx')

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) => {
-- 
cgit v1.2.3

