summaryrefslogtreecommitdiff
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.tsx9
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.`
})