From 44820f06be979d3a30d2e66c430e212e28ca6052 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 10 Jan 2024 14:44:10 -0300 Subject: save challenge id when 2fa is required --- packages/demobank-ui/src/pages/PaymentOptions.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/demobank-ui/src/pages/PaymentOptions.tsx') diff --git a/packages/demobank-ui/src/pages/PaymentOptions.tsx b/packages/demobank-ui/src/pages/PaymentOptions.tsx index bbe33eb57..1a431a939 100644 --- a/packages/demobank-ui/src/pages/PaymentOptions.tsx +++ b/packages/demobank-ui/src/pages/PaymentOptions.tsx @@ -21,6 +21,7 @@ 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"; /** * Let the user choose a payment option, @@ -28,7 +29,7 @@ import { usePreferences } from "../hooks/preferences.js"; */ export function PaymentOptions({ limit, goToConfirmOperation }: { limit: AmountJson, goToConfirmOperation: (id: string) => void }): VNode { const { i18n } = useTranslationContext(); - const [settings] = usePreferences(); + const [bankState] = useBankState(); const [tab, setTab] = useState<"charge-wallet" | "wire-transfer" | undefined>(); @@ -59,7 +60,7 @@ export function PaymentOptions({ limit, goToConfirmOperation }: { limit: AmountJ
Withdraw digital money into your mobile wallet or browser extension
- {!!settings.currentWithdrawalOperationId && + {!!bankState.currentWithdrawalOperationId &&