diff options
author | Sebastian <sebasjm@gmail.com> | 2024-01-11 16:41:24 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-01-11 16:41:42 -0300 |
commit | 82d4ed90caa4a6ea3bdda1fb80ccecf3dc3637f9 (patch) | |
tree | 59162f0565311e8699ca643a8bd60337ee7f582b /packages/demobank-ui/src/pages/PaymentOptions.tsx | |
parent | ca67640f9f94f1150c0fb67c148dc79daa9d3fa0 (diff) | |
download | wallet-core-82d4ed90caa4a6ea3bdda1fb80ccecf3dc3637f9.tar.xz |
2fa
Diffstat (limited to 'packages/demobank-ui/src/pages/PaymentOptions.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/PaymentOptions.tsx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/demobank-ui/src/pages/PaymentOptions.tsx b/packages/demobank-ui/src/pages/PaymentOptions.tsx index 1a431a939..06d293097 100644 --- a/packages/demobank-ui/src/pages/PaymentOptions.tsx +++ b/packages/demobank-ui/src/pages/PaymentOptions.tsx @@ -16,18 +16,21 @@ import { AmountJson } from "@gnu-taler/taler-util"; import { notifyInfo, useTranslationContext } from "@gnu-taler/web-util/browser"; -import { h, VNode } from "preact"; +import { VNode, h } from "preact"; import { useState } from "preact/hooks"; -import { PaytoWireTransferForm, doAutoFocus } from "./PaytoWireTransferForm.js"; -import { WalletWithdrawForm } from "./WalletWithdrawForm.js"; -import { usePreferences } from "../hooks/preferences.js"; import { useBankState } from "../hooks/bank-state.js"; +import { PaytoWireTransferForm } from "./PaytoWireTransferForm.js"; +import { WalletWithdrawForm } from "./WalletWithdrawForm.js"; /** * Let the user choose a payment option, * then specify the details trigger the action. */ -export function PaymentOptions({ limit, goToConfirmOperation }: { limit: AmountJson, goToConfirmOperation: (id: string) => void }): VNode { +export function PaymentOptions({ limit, goToConfirmOperation, onAuthorizationRequired }: { + limit: AmountJson, + onAuthorizationRequired: () => void, + goToConfirmOperation: (id: string) => void, +}): VNode { const { i18n } = useTranslationContext(); const [bankState] = useBankState(); @@ -96,6 +99,7 @@ export function PaymentOptions({ limit, goToConfirmOperation }: { limit: AmountJ <WalletWithdrawForm focus limit={limit} + onAuthorizationRequired={onAuthorizationRequired} goToConfirmOperation={goToConfirmOperation} onCancel={() => { setTab(undefined) @@ -107,6 +111,7 @@ export function PaymentOptions({ limit, goToConfirmOperation }: { limit: AmountJ focus title={i18n.str`Transfer details`} limit={limit} + onAuthorizationRequired={onAuthorizationRequired} onSuccess={() => { notifyInfo(i18n.str`Wire transfer created!`); setTab(undefined) |