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/account/ShowAccountDetails.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/account/ShowAccountDetails.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx b/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx index 1bf21f62e..28875bde6 100644 --- a/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx +++ b/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx @@ -10,6 +10,7 @@ import { LoginForm } from "../LoginForm.js"; import { ProfileNavigation } from "../ProfileNavigation.js"; import { assertUnreachable } from "../WithdrawalOperationPage.js"; import { AccountForm } from "../admin/AccountForm.js"; +import { useBankState } from "../../hooks/bank-state.js"; export function ShowAccountDetails({ account, @@ -30,6 +31,7 @@ export function ShowAccountDetails({ const [update, setUpdate] = useState(false); const [submitAccount, setSubmitAccount] = useState<TalerCorebankApi.AccountReconfiguration | undefined>(); const [notification, notify, handleError] = useLocalNotification() + const [, updateBankState] = useBankState() const result = useAccountDetails(account); if (!result) { @@ -97,7 +99,7 @@ export function ShowAccountDetails({ debug: resp.detail, }) case HttpStatusCode.Accepted: { - resp.body.challenge_id; + updateBankState("currentChallengeId", resp.body.challenge_id) return notify({ type: "info", title: i18n.str`Cashout created but confirmation is required.`, |