From f5771cc7b99dc938fd606dcbee350b66ec8027c9 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 9 Jan 2024 18:51:49 -0300 Subject: prepare for 2fa impl --- packages/demobank-ui/src/pages/WalletWithdrawForm.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/demobank-ui/src/pages/WalletWithdrawForm.tsx') diff --git a/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx b/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx index 5eef95f1e..bee36e7ad 100644 --- a/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx +++ b/packages/demobank-ui/src/pages/WalletWithdrawForm.tsx @@ -17,6 +17,7 @@ import { AmountJson, Amounts, + HttpStatusCode, Logger, TranslatedString, parseWithdrawUri @@ -103,7 +104,7 @@ function OldWithdrawalForm({ goToConfirmOperation, limit, onCancel, focus }: { } } else { switch (resp.case) { - case "insufficient-funds": { + case HttpStatusCode.Conflict: { notify({ type: "error", title: i18n.str`The operation was rejected due to insufficient funds`, @@ -112,7 +113,7 @@ function OldWithdrawalForm({ goToConfirmOperation, limit, onCancel, focus }: { }) break; } - case "unauthorized": { + case HttpStatusCode.Unauthorized: { notify({ type: "error", title: i18n.str`The operation was rejected due to insufficient funds`, @@ -121,7 +122,7 @@ function OldWithdrawalForm({ goToConfirmOperation, limit, onCancel, focus }: { }) break; } - case "account-not-found": { + case HttpStatusCode.NotFound: { notify({ type: "error", title: i18n.str`Account not found`, -- cgit v1.2.3