From c13f3cf1cd491dfd6371c34e1979a32b3cfe1370 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 25 Jan 2022 10:29:29 -0300 Subject: fix #7162 --- .../src/wallet/ManualWithdrawPage.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx') 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} /> ); } -- cgit v1.2.3