aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx')
-rw-r--r--packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx
index ed074b9c4..0ff1cf725 100644
--- a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx
+++ b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx
@@ -10,6 +10,7 @@ import { ProfileNavigation } from "../ProfileNavigation.js";
import { assertUnreachable } from "../WithdrawalOperationPage.js";
import { LocalNotificationBanner } from "@gnu-taler/web-util/browser";
import { HttpStatusCode, TalerErrorCode } from "@gnu-taler/taler-util";
+import { useBankState } from "../../hooks/bank-state.js";
export function UpdateAccountPassword({
account: accountName,
@@ -30,6 +31,7 @@ export function UpdateAccountPassword({
const [current, setCurrent] = useState<string | undefined>();
const [password, setPassword] = useState<string | undefined>();
const [repeat, setRepeat] = useState<string | undefined>();
+ const [, updateBankState] = useBankState()
const accountIsTheCurrentUser = credentials.status === "loggedIn" ?
credentials.username === accountName : false
@@ -75,7 +77,7 @@ export function UpdateAccountPassword({
title: i18n.str`Your current password doesn't match, can't change to a new password.`
})
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.`,