From fb22009ec4799a624f00c228fbd7435b44c1cbac Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 10 Jan 2022 16:04:53 -0300
Subject: deposit design from belen, feature missing: kyc

---
 .../taler-wallet-webextension/src/wallet/Transaction.tsx    | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index 8172e02a2..21bfc943d 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -73,7 +73,7 @@ export function TransactionPage({ tid }: { tid: string }): VNode {
   }
 
   if (state.hasError) {
-    route(Pages.history);
+    route(Pages.balance);
     return (
       <div>
         <i18n.Translate>
@@ -84,7 +84,16 @@ export function TransactionPage({ tid }: { tid: string }): VNode {
   }
 
   function goToHistory(): void {
-    route(Pages.history);
+    const currency =
+      state !== undefined && !state.hasError
+        ? Amounts.parseOrThrow(state.response.amountRaw).currency
+        : undefined;
+
+    if (currency) {
+      route(Pages.balance_history.replace(":currency", currency));
+    } else {
+      route(Pages.balance);
+    }
   }
 
   return (
-- 
cgit v1.2.3

