From 59d235e8d29159bc8caccf8bee6a2bca8b0b90dc Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 16 Sep 2022 16:03:58 -0300
Subject: redirect after success #7357

---
 packages/taler-wallet-webextension/src/wallet/Application.tsx | 10 ++++++++++
 1 file changed, 10 insertions(+)

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

diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx
index c7e69964b..d2cbf440f 100644
--- a/packages/taler-wallet-webextension/src/wallet/Application.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx
@@ -249,41 +249,49 @@ export function Application(): VNode {
                   redirectTo(Pages.ctaWithdrawManual({ amount }))
                 }
                 cancel={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaRefund}
                 component={RefundPage}
                 cancel={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaTips}
                 component={TipPage}
                 onCancel={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaWithdraw}
                 component={WithdrawPageFromURI}
                 cancel={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaWithdrawManual.pattern}
                 component={WithdrawPageFromParams}
                 cancel={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaDeposit}
                 component={DepositPageCTA}
                 cancel={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaInvoiceCreate.pattern}
                 component={InvoiceCreatePage}
                 onClose={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaTransferCreate.pattern}
                 component={TransferCreatePage}
                 onClose={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaInvoicePay}
@@ -292,11 +300,13 @@ export function Application(): VNode {
                   redirectTo(Pages.ctaWithdrawManual({ amount }))
                 }
                 onClose={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
               <Route
                 path={Pages.ctaTransferPickup}
                 component={TransferPickupPage}
                 onClose={() => redirectTo(Pages.balance)}
+                onSuccess={(tid:string) => redirectTo(Pages.balanceTransaction({ tid }))}
               />
 
               {/**
-- 
cgit v1.2.3

