aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-02-05 16:23:09 -0300
committerSebastian <sebasjm@gmail.com>2024-02-05 16:23:09 -0300
commit46aa042f9acb940660f7a53b4824b1d6fb2ad8b3 (patch)
treee8b03acb195a2161aa0a0e68435b07de352a4477 /packages/demobank-ui/src/pages/WalletWithdrawForm.tsx
parentf68585db5f9ba0f760e22dada474fd7ec2847796 (diff)
downloadwallet-core-46aa042f9acb940660f7a53b4824b1d6fb2ad8b3.tar.xz
fixes #8294
Diffstat (limited to 'packages/demobank-ui/src/pages/WalletWithdrawForm.tsx')
-rw-r--r--packages/demobank-ui/src/pages/WalletWithdrawForm.tsx31
1 files changed, 16 insertions, 15 deletions
diff --git a/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx b/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx
index 8ce4c6a09..be1528db8 100644
--- a/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx
+++ b/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx
@@ -20,8 +20,7 @@ import {
HttpStatusCode,
TranslatedString,
assertUnreachable,
- parseWithdrawUri,
- stringifyWithdrawUri,
+ parseWithdrawUri
} from "@gnu-taler/taler-util";
import {
Attention,
@@ -33,7 +32,6 @@ import {
import { VNode, h } from "preact";
import { forwardRef } from "preact/compat";
import { useState } from "preact/hooks";
-import { privatePages } from "../Routing.js";
import { useBankCoreApiContext } from "../context/config.js";
import { useBackendState } from "../hooks/backend.js";
import { useBankState } from "../hooks/bank-state.js";
@@ -42,8 +40,6 @@ import { RouteDefinition } from "../route.js";
import { undefinedIfEmpty } from "../utils.js";
import { OperationState } from "./OperationState/index.js";
import { InputAmount, doAutoFocus } from "./PaytoWireTransferForm.js";
-import { useTalerWalletIntegrationAPI } from "../context/wallet-integration.js";
-import { useNavigationContext } from "../context/navigation.js";
const RefAmount = forwardRef(InputAmount);
@@ -52,9 +48,11 @@ function OldWithdrawalForm({
limit,
routeCancel,
focus,
+ routeOperationDetails,
}: {
limit: AmountJson;
focus?: boolean;
+ routeOperationDetails: RouteDefinition<{ wopid: string }>,
onOperationCreated: (wopid: string) => void;
routeCancel: RouteDefinition<Record<string, never>>;
}): VNode {
@@ -83,7 +81,7 @@ function OldWithdrawalForm({
// withdrawalOperationId: bankState.currentWithdrawalOperationId,
// });
// const uri = parseWithdrawUri(suri)!
- const url = privatePages.operationDetails.url({
+ const url = routeOperationDetails.url({
wopid: bankState.currentWithdrawalOperationId,
});
return (
@@ -95,12 +93,12 @@ function OldWithdrawalForm({
<a
class="font-semibold text-yellow-700 hover:text-yellow-600"
href={url}
- // onClick={(e) => {
- // e.preventDefault()
- // walletInegrationApi.publishTalerAction(uri, () => {
- // navigateTo(url)
- // })
- // }}
+ // onClick={(e) => {
+ // e.preventDefault()
+ // walletInegrationApi.publishTalerAction(uri, () => {
+ // navigateTo(url)
+ // })
+ // }}
>
<i18n.Translate>this page</i18n.Translate>
</a>
@@ -285,9 +283,11 @@ export function WalletWithdrawForm({
onAuthorizationRequired,
onOperationCreated,
onOperationAborted,
+ routeOperationDetails,
}: {
limit: AmountJson;
focus?: boolean;
+ routeOperationDetails: RouteDefinition<{ wopid: string }>,
onAuthorizationRequired: () => void;
onOperationCreated: (wopid: string) => void;
onOperationAborted: () => void;
@@ -300,7 +300,7 @@ export function WalletWithdrawForm({
<div class="grid grid-cols-1 gap-x-8 gap-y-8 pt-10 md:grid-cols-3 bg-gray-100 my-4 px-4 pb-4 rounded-lg">
<div class="px-4 sm:px-0">
<h2 class="text-base font-semibold leading-7 text-gray-900">
- <i18n.Translate>Prepare your wallet</i18n.Translate>
+ <i18n.Translate>Prepare your Taler wallet</i18n.Translate>
</h2>
<p class="mt-1 text-sm text-gray-500">
<i18n.Translate>
@@ -313,7 +313,7 @@ export function WalletWithdrawForm({
<div class="col-span-2">
{settings.showInstallWallet && (
<Attention
- title={i18n.str`You need a GNU Taler Wallet`}
+ title={i18n.str`You need a Taler wallet`}
onClose={() => {
updateSettings("showInstallWallet", false);
}}
@@ -335,6 +335,7 @@ export function WalletWithdrawForm({
{!settings.fastWithdrawal ? (
<OldWithdrawalForm
focus={focus}
+ routeOperationDetails={routeOperationDetails}
limit={limit}
routeCancel={routeCancel}
onOperationCreated={onOperationCreated}
@@ -345,7 +346,7 @@ export function WalletWithdrawForm({
onAuthorizationRequired={onAuthorizationRequired}
routeClose={routeCancel}
onAbort={onOperationAborted}
- // route={routeCancel}
+ // route={routeCancel}
/>
)}
</div>