diff options
author | Sebastian <sebasjm@gmail.com> | 2024-01-09 18:51:49 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-01-09 18:51:49 -0300 |
commit | f5771cc7b99dc938fd606dcbee350b66ec8027c9 (patch) | |
tree | 95c1aa5b8a5e6067c7689b0caf161c50d1f694ed /packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx | |
parent | 1826b9121a0308aa0a7ac39a89ad7dc8ea2ae965 (diff) | |
download | wallet-core-f5771cc7b99dc938fd606dcbee350b66ec8027c9.tar.xz |
prepare for 2fa impl
Diffstat (limited to 'packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx index ece1f63e7..95c425dc7 100644 --- a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx +++ b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx @@ -9,6 +9,7 @@ import { doAutoFocus } from "../PaytoWireTransferForm.js"; 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"; export function UpdateAccountPassword({ account: accountName, @@ -57,19 +58,19 @@ export function UpdateAccountPassword({ onUpdateSuccess(); } else { switch (resp.case) { - case "unauthorized": return notify({ + case HttpStatusCode.Unauthorized: return notify({ type: "error", title: i18n.str`Not authorized to change the password, maybe the session is invalid.` }) - case "not-found": return notify({ + case HttpStatusCode.NotFound: return notify({ type: "error", title: i18n.str`Account not found` }) - case "user-require-old-password": return notify({ + case TalerErrorCode.BANK_NON_ADMIN_PATCH_MISSING_OLD_PASSWORD: return notify({ type: "error", title: i18n.str`Old password need to be provided in order to change new one. If you don't have it contact your account administrator.` }) - case "wrong-old-password": return notify({ + case TalerErrorCode.BANK_PATCH_BAD_OLD_PASSWORD: return notify({ type: "error", title: i18n.str`Your current password doesn't match, can't change to a new password.` }) |