From 939a23f7caa5437459f7fd374218e3d56f898e60 Mon Sep 17 00:00:00 2001 From: "Rene Vergara A." Date: Fri, 24 May 2024 21:55:03 -0400 Subject: [PATCH] rvv041 - Address Book functionality - - Check added :: value to send has to be > 0 and <= balance --- src/Zenith/CLI.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Zenith/CLI.hs b/src/Zenith/CLI.hs index 0c7e67b..b750780 100644 --- a/src/Zenith/CLI.hs +++ b/src/Zenith/CLI.hs @@ -530,7 +530,7 @@ mkSendForm bal = ] where isAmountValid :: Integer -> Float -> Bool - isAmountValid b i = (fromIntegral b * 100000000.0) >= i + isAmountValid b i = ((fromIntegral b * 100000000.0) >= i) && (i > 0) label s w = padBottom (Pad 1) $ vLimit 1 (hLimit 15 $ str s <+> fill ' ') <+> w