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/BankFrame.tsx | |
parent | 2c7db170a45fcb82deae3892d610b6b2805ee46c (diff) | |
download | wallet-core-44820f06be979d3a30d2e66c430e212e28ca6052.tar.xz |
save challenge id when 2fa is required
Diffstat (limited to 'packages/demobank-ui/src/pages/BankFrame.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/BankFrame.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/demobank-ui/src/pages/BankFrame.tsx b/packages/demobank-ui/src/pages/BankFrame.tsx index 737a00b57..9e591e95d 100644 --- a/packages/demobank-ui/src/pages/BankFrame.tsx +++ b/packages/demobank-ui/src/pages/BankFrame.tsx @@ -24,6 +24,7 @@ import { getAllBooleanPreferences, getLabelForPreferences, usePreferences } from import { RenderAmount } from "./PaytoWireTransferForm.js"; import { useSettingsContext } from "../context/settings.js"; import { useBankCoreApiContext } from "../context/config.js"; +import { useBankState } from "../hooks/bank-state.js"; const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined; const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : undefined; @@ -40,6 +41,7 @@ export function BankFrame({ const backend = useBackendState(); const settings = useSettingsContext(); const [preferences, updatePreferences] = usePreferences(); + const [, , resetBankState] = useBankState() const [error, resetError] = useErrorBoundary(); @@ -65,7 +67,7 @@ export function BankFrame({ iconLinkURL={settings.iconLinkURL ?? "#"} onLogout={backend.state.status !== "loggedIn" ? undefined : () => { backend.logOut() - updatePreferences("currentWithdrawalOperationId", undefined); + resetBankState(); }} sites={!settings.topNavSites ? [] : Object.entries(settings.topNavSites)} supportedLangs={["en", "es", "de"]} |