diff options
author | Sebastian <sebasjm@gmail.com> | 2024-01-10 14:25:39 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-01-10 14:25:39 -0300 |
commit | 2c7db170a45fcb82deae3892d610b6b2805ee46c (patch) | |
tree | 09a4218a05e18784e3dfb2dfe211836185769924 /packages/demobank-ui/src/pages/account | |
parent | b609f48ae664618b6f4e75e42221f1240c8f61f0 (diff) | |
download | wallet-core-2c7db170a45fcb82deae3892d610b6b2805ee46c.tar.xz |
bank: handles 2fa response
Diffstat (limited to 'packages/demobank-ui/src/pages/account')
-rw-r--r-- | packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx | 15 | ||||
-rw-r--r-- | packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx | 7 |
2 files changed, 22 insertions, 0 deletions
diff --git a/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx b/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx index 98fb72283..1bf21f62e 100644 --- a/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx +++ b/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx @@ -96,6 +96,21 @@ export function ShowAccountDetails({ description: resp.detail.hint as TranslatedString, debug: resp.detail, }) + case HttpStatusCode.Accepted: { + resp.body.challenge_id; + return notify({ + type: "info", + title: i18n.str`Cashout created but confirmation is required.`, + }); + } + case TalerErrorCode.BANK_TAN_CHANNEL_NOT_SUPPORTED: { + return notify({ + type: "error", + title: i18n.str`Authentication channel is not supported.`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + }); + } default: assertUnreachable(resp) } } diff --git a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx index 95c425dc7..ed074b9c4 100644 --- a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx +++ b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx @@ -74,6 +74,13 @@ export function UpdateAccountPassword({ type: "error", title: i18n.str`Your current password doesn't match, can't change to a new password.` }) + case HttpStatusCode.Accepted: { + resp.body.challenge_id; + return notify({ + type: "info", + title: i18n.str`Cashout created but confirmation is required.`, + }); + } default: assertUnreachable(resp) } } |