aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-08-07 12:52:04 -0300
committerSebastian <sebasjm@gmail.com>2024-08-07 12:52:04 -0300
commit672009cee63a9b7387d2100b114a03576d6253fd (patch)
tree4e73b9852aef4d01881d0295aa1670305bd79bcb /packages
parente040eb7378d25f0ae9cb72a6c7dd6750a9bb0cbd (diff)
fix #8960
Diffstat (limited to 'packages')
-rw-r--r--packages/bank-ui/src/Routing.tsx6
-rw-r--r--packages/bank-ui/src/pages/WithdrawalOperationPage.tsx4
-rw-r--r--packages/bank-ui/src/pages/WithdrawalQRCode.tsx18
3 files changed, 17 insertions, 11 deletions
diff --git a/packages/bank-ui/src/Routing.tsx b/packages/bank-ui/src/Routing.tsx
index 0da4819c2..2b3e4e6ae 100644
--- a/packages/bank-ui/src/Routing.tsx
+++ b/packages/bank-ui/src/Routing.tsx
@@ -167,7 +167,7 @@ function PublicRounting({
<WithdrawalOperationPage
operationId={location.values.wopid}
routeWithdrawalDetails={publicPages.operationDetails}
- purpose="after-confirmation"
+ origin="from-wallet-ui"
onOperationAborted={() => navigateTo(publicPages.login.url({}))}
routeClose={publicPages.login}
onAuthorizationRequired={() =>
@@ -284,7 +284,7 @@ function PrivateRouting({
<WithdrawalOperationPage
operationId={location.values.wopid}
routeWithdrawalDetails={privatePages.operationDetails}
- purpose="after-confirmation"
+ origin="from-wallet-ui"
onOperationAborted={() => navigateTo(privatePages.home.url({}))}
routeClose={privatePages.home}
onAuthorizationRequired={() =>
@@ -298,7 +298,7 @@ function PrivateRouting({
<WithdrawalOperationPage
operationId={location.values.wopid}
routeWithdrawalDetails={privatePages.operationDetails}
- purpose="after-creation"
+ origin="from-bank-ui"
onOperationAborted={() => navigateTo(privatePages.home.url({}))}
routeClose={privatePages.home}
onAuthorizationRequired={() =>
diff --git a/packages/bank-ui/src/pages/WithdrawalOperationPage.tsx b/packages/bank-ui/src/pages/WithdrawalOperationPage.tsx
index c0c55f14b..832478656 100644
--- a/packages/bank-ui/src/pages/WithdrawalOperationPage.tsx
+++ b/packages/bank-ui/src/pages/WithdrawalOperationPage.tsx
@@ -27,11 +27,12 @@ export function WithdrawalOperationPage({
onAuthorizationRequired,
onOperationAborted,
routeClose,
+ origin,
routeWithdrawalDetails,
}: {
onAuthorizationRequired: () => void;
operationId: string;
- purpose: "after-creation" | "after-confirmation";
+ origin: "from-bank-ui" | "from-wallet-ui";
onOperationAborted: () => void;
routeClose: RouteDefinition;
routeWithdrawalDetails: RouteDefinition<{ wopid: string }>;
@@ -61,6 +62,7 @@ export function WithdrawalOperationPage({
return (
<WithdrawalQRCode
withdrawUri={parsedUri}
+ origin={origin}
routeWithdrawalDetails={routeWithdrawalDetails}
onAuthorizationRequired={onAuthorizationRequired}
onOperationAborted={() => {
diff --git a/packages/bank-ui/src/pages/WithdrawalQRCode.tsx b/packages/bank-ui/src/pages/WithdrawalQRCode.tsx
index fc6d20631..37918396a 100644
--- a/packages/bank-ui/src/pages/WithdrawalQRCode.tsx
+++ b/packages/bank-ui/src/pages/WithdrawalQRCode.tsx
@@ -38,6 +38,7 @@ import { WithdrawalConfirmationQuestion } from "./WithdrawalConfirmationQuestion
interface Props {
withdrawUri: WithdrawUriResult;
+ origin: "from-bank-ui" | "from-wallet-ui";
onOperationAborted: () => void;
routeClose: RouteDefinition;
routeWithdrawalDetails: RouteDefinition<{ wopid: string }>;
@@ -52,6 +53,7 @@ export function WithdrawalQRCode({
withdrawUri,
onOperationAborted,
routeClose,
+ origin,
routeWithdrawalDetails,
onAuthorizationRequired,
}: Props): VNode {
@@ -171,13 +173,15 @@ export function WithdrawalQRCode({
>
<i18n.Translate>Close</i18n.Translate>
</a>
- <a
- href={talerWithdrawUri}
- name="done"
- class="inline-flex justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
- >
- <i18n.Translate>Go to wallet</i18n.Translate>
- </a>
+ {origin === "from-wallet-ui" ? (
+ <a
+ href={talerWithdrawUri}
+ name="done"
+ class="inline-flex justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
+ >
+ <i18n.Translate>Go to wallet</i18n.Translate>
+ </a>
+ ) : undefined}
</div>
</div>
);