gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant-backoffice] 01/02: fix: use amounts.isZero instead of va


From: gnunet
Subject: [taler-merchant-backoffice] 01/02: fix: use amounts.isZero instead of value
Date: Wed, 18 May 2022 21:18:56 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository merchant-backoffice.

commit abc489d8ebd294dd1b2e86b330cfa626017debdb
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed May 18 16:18:12 2022 -0300

    fix: use amounts.isZero instead of value
---
 .../merchant-backoffice/src/paths/instance/orders/create/CreatePage.tsx | 2 +-
 packages/merchant-backoffice/src/paths/instance/products/list/Table.tsx | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/packages/merchant-backoffice/src/paths/instance/orders/create/CreatePage.tsx 
b/packages/merchant-backoffice/src/paths/instance/orders/create/CreatePage.tsx
index 38ac657..0c67cdf 100644
--- 
a/packages/merchant-backoffice/src/paths/instance/orders/create/CreatePage.tsx
+++ 
b/packages/merchant-backoffice/src/paths/instance/orders/create/CreatePage.tsx
@@ -152,7 +152,7 @@ export function CreatePage({
       summary: !value.pricing?.summary ? i18n`required` : undefined,
       order_price: !value.pricing?.order_price
         ? i18n`required`
-        : (Amounts.parse(value.pricing.order_price)?.value || 0) <= 0
+        : Amounts.isZero(value.pricing.order_price)
         ? i18n`must be greater than 0`
         : undefined,
     }),
diff --git 
a/packages/merchant-backoffice/src/paths/instance/products/list/Table.tsx 
b/packages/merchant-backoffice/src/paths/instance/products/list/Table.tsx
index 6514c22..9c85d97 100644
--- a/packages/merchant-backoffice/src/paths/instance/products/list/Table.tsx
+++ b/packages/merchant-backoffice/src/paths/instance/products/list/Table.tsx
@@ -173,7 +173,7 @@ function Table({
               );
             }
 
-            const isFree = Amounts.parseOrThrow(i.price).value === 0;
+            const isFree = Amounts.isZero(Amounts.parseOrThrow(i.price));
 
             return (
               <Fragment key={i.id}>

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]