aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>
);