[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 05/19: fix: empty form should not allow the "send" b
From: |
gnunet |
Subject: |
[taler-wallet-core] 05/19: fix: empty form should not allow the "send" button |
Date: |
Wed, 07 Dec 2022 20:08:33 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit 7061127c073ba3710c55d13294a75f8bc9b91229
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Dec 7 09:30:01 2022 -0300
fix: empty form should not allow the "send" button
---
packages/demobank-ui/src/pages/home/index.tsx | 32 +++++++++++++--------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/packages/demobank-ui/src/pages/home/index.tsx
b/packages/demobank-ui/src/pages/home/index.tsx
index 49fe9e929..7631ebf46 100644
--- a/packages/demobank-ui/src/pages/home/index.tsx
+++ b/packages/demobank-ui/src/pages/home/index.tsx
@@ -916,23 +916,21 @@ function PaytoWireTransfer(Props: any): VNode {
// submitData.amount === ""
let parsedAmount = undefined;
- const errorsWire = !submitData
- ? undefined
- : undefinedIfEmpty({
- iban: !submitData.iban
- ? i18n.str`Missing IBAN`
- : !/^[A-Z0-9]*$/.test(submitData.iban)
- ? i18n.str`IBAN should have just uppercased letters and numbers`
- : undefined,
- subject: !submitData.subject ? i18n.str`Missing subject` : undefined,
- amount: !submitData.amount
- ? i18n.str`Missing amount`
- : !(parsedAmount = Amounts.parse(`${currency}:${submitData.amount}`))
- ? i18n.str`Amount is not valid`
- : Amounts.isZero(parsedAmount)
- ? i18n.str`Should be greater than 0`
- : undefined,
- });
+ const errorsWire = {
+ iban: !submitData?.iban
+ ? i18n.str`Missing IBAN`
+ : !/^[A-Z0-9]*$/.test(submitData.iban)
+ ? i18n.str`IBAN should have just uppercased letters and numbers`
+ : undefined,
+ subject: !submitData?.subject ? i18n.str`Missing subject` : undefined,
+ amount: !submitData?.amount
+ ? i18n.str`Missing amount`
+ : !(parsedAmount = Amounts.parse(`${currency}:${submitData.amount}`))
+ ? i18n.str`Amount is not valid`
+ : Amounts.isZero(parsedAmount)
+ ? i18n.str`Should be greater than 0`
+ : undefined,
+ };
if (!pageState.isRawPayto)
return (
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated (0c19050ae -> 46835d515), gnunet, 2022/12/07
- [taler-wallet-core] 03/19: fix: remove red style when input is invalid, gnunet, 2022/12/07
- [taler-wallet-core] 04/19: no-fix: move out useBackend hook, gnunet, 2022/12/07
- [taler-wallet-core] 02/19: no-fix: move pagestate provider to app component and move some common hooks to web-utils, gnunet, 2022/12/07
- [taler-wallet-core] 13/19: also listen for tab title change, gnunet, 2022/12/07
- [taler-wallet-core] 01/19: pretty, gnunet, 2022/12/07
- [taler-wallet-core] 05/19: fix: empty form should not allow the "send" button,
gnunet <=
- [taler-wallet-core] 19/19: no-fix: user logger instead of console.log, gnunet, 2022/12/07
- [taler-wallet-core] 11/19: no-fix: removing unused showPublicHistories, gnunet, 2022/12/07
- [taler-wallet-core] 15/19: fix jsx config, gnunet, 2022/12/07
- [taler-wallet-core] 14/19: fix: updating the title is better that location.hash, gnunet, 2022/12/07
- [taler-wallet-core] 08/19: no-fix: move out routing, gnunet, 2022/12/07
- [taler-wallet-core] 16/19: no-fix: remove unused, gnunet, 2022/12/07
- [taler-wallet-core] 12/19: no-fix: moved out AccountPage, gnunet, 2022/12/07
- [taler-wallet-core] 07/19: fix: show error message on login and registration form, prevent saving password on localstorage, gnunet, 2022/12/07
- [taler-wallet-core] 18/19: feature: useLocalStorage also update when the localStorage has been updated from other window, gnunet, 2022/12/07
- [taler-wallet-core] 06/19: fix: better loading page while waiting for server response, gnunet, 2022/12/07