From 7b18ebd5d9a355837585935572b30590957e7250 Mon Sep 17 00:00:00 2001 From: Theophilus <60826700+Extheoisah@users.noreply.github.com> Date: Wed, 21 Dec 2022 17:51:57 +0100 Subject: [PATCH] fix: fix zero leading input when changing between SAT and USD units (#381) * chore: disable period(.) button when amount unit is sat * fix: fix zero leading inputs when switching between sat and usd units --- components/ParsePOSPayment/Digit-Button.tsx | 8 ++++++-- components/ParsePOSPayment/index.tsx | 6 +++++- pages/_reducer.tsx | 5 +++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/components/ParsePOSPayment/Digit-Button.tsx b/components/ParsePOSPayment/Digit-Button.tsx index c7c221a3..f4acad5e 100644 --- a/components/ParsePOSPayment/Digit-Button.tsx +++ b/components/ParsePOSPayment/Digit-Button.tsx @@ -4,12 +4,16 @@ import { ACTIONS, ACTION_TYPE } from "../../pages/_reducer" interface Props { digit: string + disabled?: boolean dispatch: React.Dispatch } -function DigitButton({ digit, dispatch }: Props) { +function DigitButton({ digit, disabled, dispatch }: Props) { return ( - ) diff --git a/components/ParsePOSPayment/index.tsx b/components/ParsePOSPayment/index.tsx index 0ce43a12..9475e90a 100644 --- a/components/ParsePOSPayment/index.tsx +++ b/components/ParsePOSPayment/index.tsx @@ -214,7 +214,11 @@ function ParsePayment({ defaultWalletCurrency, walletId, dispatch, state }: Prop - +