From c66f06eb73e53a8804b8c2b36ff45972836c633c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 23 Oct 2023 15:49:13 -0300 Subject: update conversion rate info, added test-bank-api in taler harness --- packages/demobank-ui/src/pages/UpdateAccountPassword.tsx | 6 ++++-- packages/demobank-ui/src/pages/business/CreateCashout.tsx | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'packages/demobank-ui/src') diff --git a/packages/demobank-ui/src/pages/UpdateAccountPassword.tsx b/packages/demobank-ui/src/pages/UpdateAccountPassword.tsx index ef3737e81..f23285528 100644 --- a/packages/demobank-ui/src/pages/UpdateAccountPassword.tsx +++ b/packages/demobank-ui/src/pages/UpdateAccountPassword.tsx @@ -47,7 +47,7 @@ export function UpdateAccountPassword({ if (!!errors || !password || !token) return; await withRuntimeErrorHandling(i18n, async () => { const resp = await api.updatePassword({ username: accountName, token }, { - // old_password: current, + old_password: current, new_password: password, }); if (resp.type === "ok") { @@ -61,7 +61,9 @@ export function UpdateAccountPassword({ }) case "no-rights": return notify({ type: "error", - title: i18n.str`This user have no right on to change the password.` + title: current ? + i18n.str`This user have no right on to change the password.` : + i18n.str`This user have no right on to change the password or the old password doesn't match.` }) case "not-found": return notify({ type: "error", diff --git a/packages/demobank-ui/src/pages/business/CreateCashout.tsx b/packages/demobank-ui/src/pages/business/CreateCashout.tsx index 5595d3b51..a3a48eed4 100644 --- a/packages/demobank-ui/src/pages/business/CreateCashout.tsx +++ b/packages/demobank-ui/src/pages/business/CreateCashout.tsx @@ -110,14 +110,14 @@ export function CreateCashout({ } } - if (resultRatios.type === "fail") { - switch (resultRatios.case) { - case "not-supported": return
cashout operations are not supported
- default: assertUnreachable(resultRatios.case) - } - } + // if (resultRatios.type === "fail") { + // switch (resultRatios.case) { + // case "not-supported": return
cashout operations are not supported
+ // default: assertUnreachable(resultRatios.case) + // } + // } - const ratio = resultRatios.body + // const ratio = resultRatios.body const account = { balance: Amounts.parseOrThrow(resultAccount.body.balance.amount), -- cgit v1.2.3