File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
WooCommerce/Classes/POS/ViewHelpers Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,16 @@ final class CollectCashViewHelper {
5757 func isPaymentButtonEnabled( orderTotal: String ,
5858 textFieldAmountInput: String ,
5959 isLoading: Bool ) -> Bool {
60+ guard !isLoading else {
61+ return false
62+ }
63+
64+ let inputAmount = textFieldAmountInput. isNotEmpty ? textFieldAmountInput : " 0 "
6065 guard let orderDecimal = parseCurrency ( orderTotal) ,
61- let inputDecimal = parseCurrency ( textFieldAmountInput . isNotEmpty ? textFieldAmountInput : " 0 " ) else {
66+ let inputDecimal = parseCurrency ( inputAmount ) else {
6267 return false
6368 }
64- return inputDecimal >= orderDecimal && !isLoading
69+ return inputDecimal >= orderDecimal
6570 }
6671
6772 func parseCurrency( _ amountString: String ) -> Decimal ? {
You can’t perform that action at this time.
0 commit comments