diff options
author | Sebastian <sebasjm@gmail.com> | 2023-11-06 14:48:35 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-11-06 14:48:35 -0300 |
commit | 656fcae88c183ebb2c0d61c94ea763b110cae918 (patch) | |
tree | 49b6b6e62fe47c73ce4bdff6eca4ba1acb835d14 /packages/taler-wallet-webextension/src/popup | |
parent | 35369bdc722780eab5e9cd08703cf72d718b0dba (diff) | |
download | wallet-core-656fcae88c183ebb2c0d61c94ea763b110cae918.tar.gz wallet-core-656fcae88c183ebb2c0d61c94ea763b110cae918.tar.bz2 wallet-core-656fcae88c183ebb2c0d61c94ea763b110cae918.zip |
show kyc requirement
Diffstat (limited to 'packages/taler-wallet-webextension/src/popup')
-rw-r--r-- | packages/taler-wallet-webextension/src/popup/Application.tsx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/popup/Application.tsx b/packages/taler-wallet-webextension/src/popup/Application.tsx index 234e73eed..cbb9b50b2 100644 --- a/packages/taler-wallet-webextension/src/popup/Application.tsx +++ b/packages/taler-wallet-webextension/src/popup/Application.tsx @@ -67,12 +67,16 @@ function ApplicationView(): VNode { redirectTo(Pages.balanceTransaction({ tid })); } + function redirectToURL(str: string): void { + platform.openNewURLFromPopup(new URL(str)) + } + return ( <Router history={hash_history}> <Route path={Pages.balance} component={() => ( - <PopupTemplate path="balance" goToTransaction={redirectToTxInfo}> + <PopupTemplate path="balance" goToTransaction={redirectToTxInfo} goToURL={redirectToURL}> <BalancePage goToWalletManualWithdraw={() => redirectTo(Pages.receiveCash({}))} goToWalletDeposit={(currency: string) => @@ -92,7 +96,7 @@ function ApplicationView(): VNode { // const [, setDismissed] = useTalerActionURL(); return ( - <PopupTemplate> + <PopupTemplate goToURL={redirectToURL}> <TalerActionFound url={decodeURIComponent(action)} onDismiss={() => { @@ -108,7 +112,7 @@ function ApplicationView(): VNode { <Route path={Pages.backup} component={() => ( - <PopupTemplate path="backup" goToTransaction={redirectToTxInfo}> + <PopupTemplate path="backup" goToTransaction={redirectToTxInfo} goToURL={redirectToURL}> <BackupPage onAddProvider={() => redirectTo(Pages.backupProviderAdd)} /> @@ -118,7 +122,7 @@ function ApplicationView(): VNode { <Route path={Pages.backupProviderDetail.pattern} component={({ pid }: { pid: string }) => ( - <PopupTemplate path="backup"> + <PopupTemplate path="backup" goToURL={redirectToURL}> <ProviderDetailPage onPayProvider={(uri: string) => redirectTo(`${Pages.ctaPay}?talerPayUri=${uri}`) @@ -206,17 +210,16 @@ function PopupTemplate({ path, children, goToTransaction, + goToURL, }: { path?: PopupNavBarOptions; children: ComponentChildren; goToTransaction?: (id: string) => Promise<void>; + goToURL: (s: string) => void; }): VNode { return ( <Fragment> - {/* <CheckTalerActionComponent /> */} - {goToTransaction ? ( - <PendingTransactions goToTransaction={goToTransaction} /> - ) : undefined} + <PendingTransactions goToTransaction={goToTransaction} goToURL={goToURL} /> <PopupNavBar path={path} /> <PopupBox> <AlertProvider>{children}</AlertProvider> |