From c13f3cf1cd491dfd6371c34e1979a32b3cfe1370 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 25 Jan 2022 10:29:29 -0300
Subject: fix #7162

---
 .../src/walletEntryPoint.tsx                       | 24 ++++++++++++++++------
 1 file changed, 18 insertions(+), 6 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 c8bbc7f7a..629b93fc5 100644
--- a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
+++ b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
@@ -121,12 +121,6 @@ function Application(): VNode {
                  * BALANCE
                  */}
 
-                <Route
-                  path={Pages.balance}
-                  component={Redirect}
-                  to={Pages.balance_history.replace(":currency", "")}
-                />
-
                 <Route
                   path={Pages.balance_history}
                   component={HistoryPage}
@@ -145,11 +139,22 @@ function Application(): VNode {
                 <Route
                   path={Pages.balance_transaction}
                   component={TransactionPage}
+                  goToWalletHistory={(currency?: string) => {
+                    route(
+                      Pages.balance_history.replace(
+                        ":currency",
+                        currency || "",
+                      ),
+                    );
+                  }}
                 />
 
                 <Route
                   path={Pages.balance_manual_withdraw}
                   component={ManualWithdrawPage}
+                  onCancel={() => {
+                    route(Pages.balance);
+                  }}
                 />
 
                 <Route
@@ -232,7 +237,14 @@ function Application(): VNode {
 
                 {/**
                  * NOT FOUND
+                 * all redirects should be at the end
                  */}
+                <Route
+                  path={Pages.balance}
+                  component={Redirect}
+                  to={Pages.balance_history.replace(":currency", "")}
+                />
+
                 <Route
                   default
                   component={Redirect}
-- 
cgit v1.2.3

