From cbad631483b1386674a0e7aa38e17032dfebefe5 Mon Sep 17 00:00:00 2001 From: Adarsh Date: Sun, 29 Oct 2023 14:04:15 +0530 Subject: [PATCH 1/2] feat: Disable 'Create Invoice' button until an amount is entered Fixes : #2802 The button is now disabled until the user enters a value in the 'Amount' field. This ensures that the user cannot create an invoice without specifying the amount first. This change helps to prevent invalid or incomplete invoice creation. --- src/app/screens/ReceiveInvoice/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/screens/ReceiveInvoice/index.tsx b/src/app/screens/ReceiveInvoice/index.tsx index 02242e8e2c..7e8b4f7dca 100644 --- a/src/app/screens/ReceiveInvoice/index.tsx +++ b/src/app/screens/ReceiveInvoice/index.tsx @@ -264,7 +264,11 @@ function ReceiveInvoice() { fullWidth primary loading={loadingInvoice} - disabled={loadingInvoice} + disabled={ + loadingInvoice || + !formData.amount || + formData.amount === "0" + } /> From c935d8f7f83d7430f070f69bdc880ecc2e318914 Mon Sep 17 00:00:00 2001 From: Adarsh Rawat Date: Tue, 26 Dec 2023 22:23:48 +0530 Subject: [PATCH 2/2] Fix: removed Amount zero check --- src/app/screens/ReceiveInvoice/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/app/screens/ReceiveInvoice/index.tsx b/src/app/screens/ReceiveInvoice/index.tsx index f9d129e92f..787ba6a599 100644 --- a/src/app/screens/ReceiveInvoice/index.tsx +++ b/src/app/screens/ReceiveInvoice/index.tsx @@ -266,11 +266,7 @@ function ReceiveInvoice() { fullWidth primary loading={loadingInvoice} - disabled={ - loadingInvoice || - !formData.amount || - formData.amount === "0" - } + disabled={loadingInvoice || !formData.amount} />