summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-03-10 01:27:31 -0300
committerSebastian <sebasjm@gmail.com>2023-03-10 01:27:31 -0300
commit867d2ca76b2ca8903b2263a68243899749de7011 (patch)
tree5abb027f7976a8694d29e5be4f8d9e8528bf1a0c /packages/taler-wallet-webextension/src/wallet
parentf40487806304dbaafa74544d5a8f74ab56569044 (diff)
downloadwallet-core-867d2ca76b2ca8903b2263a68243899749de7011.tar.gz
wallet-core-867d2ca76b2ca8903b2263a68243899749de7011.tar.bz2
wallet-core-867d2ca76b2ca8903b2263a68243899749de7011.zip
fix encoded uri, add pay template cta
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Application.tsx33
1 files changed, 21 insertions, 12 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx
index f29c169d0..fc8ddb804 100644
--- a/packages/taler-wallet-webextension/src/wallet/Application.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx
@@ -289,7 +289,7 @@ export function Application(): VNode {
component={({ talerPayUri }: { talerPayUri: string }) => (
<CallToActionTemplate title={i18n.str`Digital cash payment`}>
<PaymentPage
- talerPayUri={talerPayUri}
+ talerPayUri={decodeURIComponent(talerPayUri)}
goToWalletManualWithdraw={(amount?: string) =>
redirectTo(Pages.receiveCash({ amount }))
}
@@ -302,14 +302,23 @@ export function Application(): VNode {
)}
/>
<Route
- path={Pages.ctaPay}
+ path={Pages.ctaPayTemplate}
component={({
- talerTemplateUri,
+ talerPayTemplateUri,
}: {
- talerTemplateUri: string;
+ talerPayTemplateUri: string;
}) => (
<CallToActionTemplate title={i18n.str`Digital cash payment`}>
- <PaymentTemplatePage talerTemplateUri={talerTemplateUri} />
+ <PaymentTemplatePage
+ talerTemplateUri={decodeURIComponent(talerPayTemplateUri)}
+ goToWalletManualWithdraw={(amount?: string) =>
+ redirectTo(Pages.receiveCash({ amount }))
+ }
+ cancel={() => redirectTo(Pages.balance)}
+ onSuccess={(tid: string) =>
+ redirectTo(Pages.balanceTransaction({ tid }))
+ }
+ />
</CallToActionTemplate>
)}
/>
@@ -318,7 +327,7 @@ export function Application(): VNode {
component={({ talerRefundUri }: { talerRefundUri: string }) => (
<CallToActionTemplate title={i18n.str`Digital cash refund`}>
<RefundPage
- talerRefundUri={talerRefundUri}
+ talerRefundUri={decodeURIComponent(talerRefundUri)}
cancel={() => redirectTo(Pages.balance)}
onSuccess={(tid: string) =>
redirectTo(Pages.balanceTransaction({ tid }))
@@ -332,7 +341,7 @@ export function Application(): VNode {
component={({ talerTipUri }: { talerTipUri: string }) => (
<CallToActionTemplate title={i18n.str`Digital cash tip`}>
<TipPage
- talerTipUri={talerTipUri}
+ talerTipUri={decodeURIComponent(talerTipUri)}
onCancel={() => redirectTo(Pages.balance)}
onSuccess={(tid: string) =>
redirectTo(Pages.balanceTransaction({ tid }))
@@ -350,7 +359,7 @@ export function Application(): VNode {
}) => (
<CallToActionTemplate title={i18n.str`Digital cash withdrawal`}>
<WithdrawPageFromURI
- talerWithdrawUri={talerWithdrawUri}
+ talerWithdrawUri={decodeURIComponent(talerWithdrawUri)}
cancel={() => redirectTo(Pages.balance)}
onSuccess={(tid: string) =>
redirectTo(Pages.balanceTransaction({ tid }))
@@ -385,7 +394,7 @@ export function Application(): VNode {
<CallToActionTemplate title={i18n.str`Digital cash deposit`}>
<DepositPageCTA
amountStr={amount}
- talerDepositUri={talerDepositUri}
+ talerDepositUri={decodeURIComponent(talerDepositUri)}
cancel={() => redirectTo(Pages.balance)}
onSuccess={(tid: string) =>
redirectTo(Pages.balanceTransaction({ tid }))
@@ -427,7 +436,7 @@ export function Application(): VNode {
component={({ talerPayPullUri }: { talerPayPullUri: string }) => (
<CallToActionTemplate title={i18n.str`Digital cash invoice`}>
<InvoicePayPage
- talerPayPullUri={talerPayPullUri}
+ talerPayPullUri={decodeURIComponent(talerPayPullUri)}
goToWalletManualWithdraw={(amount?: string) =>
redirectTo(Pages.receiveCash({ amount }))
}
@@ -444,7 +453,7 @@ export function Application(): VNode {
component={({ talerPayPushUri }: { talerPayPushUri: string }) => (
<CallToActionTemplate title={i18n.str`Digital cash transfer`}>
<TransferPickupPage
- talerPayPushUri={talerPayPushUri}
+ talerPayPushUri={decodeURIComponent(talerPayPushUri)}
onClose={() => redirectTo(Pages.balance)}
onSuccess={(tid: string) =>
redirectTo(Pages.balanceTransaction({ tid }))
@@ -462,7 +471,7 @@ export function Application(): VNode {
}) => (
<CallToActionTemplate title={i18n.str`Digital cash recovery`}>
<RecoveryPage
- talerRecoveryUri={talerRecoveryUri}
+ talerRecoveryUri={decodeURIComponent(talerRecoveryUri)}
onCancel={() => redirectTo(Pages.balance)}
onSuccess={() => redirectTo(Pages.backup)}
/>