diff options
author | Sebastian <sebasjm@gmail.com> | 2024-01-10 14:44:10 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-01-10 14:44:10 -0300 |
commit | 44820f06be979d3a30d2e66c430e212e28ca6052 (patch) | |
tree | 10325f2eadfafcdeb293524852142a6cd70e390d /packages/demobank-ui/src/pages/PaymentOptions.tsx | |
parent | 2c7db170a45fcb82deae3892d610b6b2805ee46c (diff) | |
download | wallet-core-44820f06be979d3a30d2e66c430e212e28ca6052.tar.gz wallet-core-44820f06be979d3a30d2e66c430e212e28ca6052.tar.bz2 wallet-core-44820f06be979d3a30d2e66c430e212e28ca6052.zip |
save challenge id when 2fa is required
Diffstat (limited to 'packages/demobank-ui/src/pages/PaymentOptions.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/PaymentOptions.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
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 <div class="mt-1 flex items-center text-sm text-gray-500"> <i18n.Translate>Withdraw digital money into your mobile wallet or browser extension</i18n.Translate> </div> - {!!settings.currentWithdrawalOperationId && + {!!bankState.currentWithdrawalOperationId && <span class="flex items-center gap-x-1.5 w-fit rounded-md bg-green-100 px-2 py-1 text-xs font-medium text-green-700 whitespace-pre"> <svg class="h-1.5 w-1.5 fill-green-500" viewBox="0 0 6 6" aria-hidden="true"> <circle cx="3" cy="3" r="3" /> |