From cdc8e9afdfb93bd8a90d1e6cf0ea9aa20159e43a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 15 Aug 2022 21:18:39 -0300 Subject: destination ui --- .../src/wallet/ManualWithdrawPage.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 a45daa6b1..a292914fb 100644 --- a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx @@ -33,11 +33,11 @@ import { CreateManualWithdraw } from "./CreateManualWithdraw.js"; import { ReserveCreated } from "./ReserveCreated.js"; interface Props { - currency?: string; + amount?: string; onCancel: () => Promise; } -export function ManualWithdrawPage({ currency, onCancel }: Props): VNode { +export function ManualWithdrawPage({ amount, onCancel }: Props): VNode { const [success, setSuccess] = useState< | { response: AcceptManualWithdrawalResult; @@ -117,12 +117,18 @@ export function ManualWithdrawPage({ currency, onCancel }: Props): VNode { {} as Record, ); + const parsedAmount = !amount ? undefined : Amounts.parse(amount); + const currency = parsedAmount?.currency; + const amountValue = !parsedAmount + ? undefined + : Amounts.stringifyValue(parsedAmount); return ( ); } -- cgit v1.2.3