From 32cd54e11d80bde0274b3c0238f8f5bd00ff83cb Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 21 Mar 2022 12:49:41 -0300
Subject: fix: handle new optional parameter for settings_exchange_add page

---
 .../src/walletEntryPoint.tsx                       | 36 +++++++++++-----------
 1 file changed, 18 insertions(+), 18 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
index 9a1d8699a..2f53917e4 100644
--- a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
+++ b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
@@ -113,23 +113,23 @@ function Application(): VNode {
                 <Fragment>
                   <LogoHeader />
                   <WalletNavBar path={path} />
+                  <div
+                    style={{
+                      backgroundColor: "lightcyan",
+                      display: "flex",
+                      justifyContent: "center",
+                    }}
+                  >
+                    <PendingTransactions
+                      goToTransaction={(txId: string) =>
+                        route(Pages.balance_transaction.replace(":tid", txId))
+                      }
+                    />
+                  </div>
                 </Fragment>
               );
             }}
           </Match>
-          <div
-            style={{
-              backgroundColor: "lightcyan",
-              display: "flex",
-              justifyContent: "center",
-            }}
-          >
-            <PendingTransactions
-              goToTransaction={(txId: string) =>
-                route(Pages.balance_transaction.replace(":tid", txId))
-              }
-            />
-          </div>
           <WalletBox>
             {globalNotification && (
               <SuccessBox onClick={clearNotification}>
@@ -166,7 +166,7 @@ function Application(): VNode {
                 component={TransactionPage}
                 goToWalletHistory={(currency?: string) => {
                   route(
-                    Pages.balance_history.replace(":currency", currency || ""),
+                    Pages.balance_history.replace(":currency?", currency || ""),
                   );
                 }}
               />
@@ -183,10 +183,10 @@ function Application(): VNode {
                 path={Pages.balance_deposit}
                 component={DepositPage}
                 onCancel={(currency: string) => {
-                  route(Pages.balance_history.replace(":currency", currency));
+                  route(Pages.balance_history.replace(":currency?", currency));
                 }}
                 onSuccess={(currency: string) => {
-                  route(Pages.balance_history.replace(":currency", currency));
+                  route(Pages.balance_history.replace(":currency?", currency));
                   setGlobalNotification(
                     <i18n.Translate>
                       All done, your transaction is in progress
@@ -268,13 +268,13 @@ function Application(): VNode {
               <Route
                 path={Pages.balance}
                 component={Redirect}
-                to={Pages.balance_history.replace(":currency", "")}
+                to={Pages.balance_history.replace(":currency?", "")}
               />
 
               <Route
                 default
                 component={Redirect}
-                to={Pages.balance_history.replace(":currency", "")}
+                to={Pages.balance_history.replace(":currency?", "")}
               />
             </Router>
           </WalletBox>
-- 
cgit v1.2.3

