diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx index 86c3c1456..1f8603794 100644 --- a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx @@ -21,7 +21,6 @@ import { NotificationType, } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; -import { route } from "preact-router"; import { useState } from "preact/hooks"; import { Loading } from "../components/Loading"; import { LoadingError } from "../components/LoadingError"; @@ -32,7 +31,12 @@ import { CreateManualWithdraw } from "./CreateManualWithdraw"; import { ExchangeAddPage } from "./ExchangeAddPage"; import { ReserveCreated } from "./ReserveCreated"; -export function ManualWithdrawPage({ currency }: { currency?: string }): VNode { +interface Props { + currency?: string; + onCancel: () => void; +} + +export function ManualWithdrawPage({ currency, onCancel }: Props): VNode { const [success, setSuccess] = useState< | { response: AcceptManualWithdrawalResult; @@ -80,9 +84,7 @@ export function ManualWithdrawPage({ currency }: { currency?: string }): VNode { payto={success.response.exchangePaytoUris[0]} exchangeBaseUrl={success.exchangeBaseUrl} amount={success.amount} - onBack={() => { - route(Pages.balance); - }} + onCancel={onCancel} /> ); } |