aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/PaymentOptions.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/pages/PaymentOptions.tsx')
-rw-r--r--packages/demobank-ui/src/pages/PaymentOptions.tsx15
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)