From dbb2266260285a514ab1292d3f98c50e88db54e1 Mon Sep 17 00:00:00 2001 From: fede erbes Date: Mon, 22 Jan 2024 10:56:43 +0100 Subject: [PATCH] fix: wrong variable used in validation to show top divider for first asset item in receive in payment section component (#762) --- .../components/confirmBtcTransaction/receiveSection.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/components/confirmBtcTransaction/receiveSection.tsx b/src/app/components/confirmBtcTransaction/receiveSection.tsx index 9aa8e6923..404f3c351 100644 --- a/src/app/components/confirmBtcTransaction/receiveSection.tsx +++ b/src/app/components/confirmBtcTransaction/receiveSection.tsx @@ -57,7 +57,8 @@ function ReceiveSection({ outputs, netAmount, onShowInscription }: Props) { (output) => output.inscriptions.length > 0 || output.satributes.length > 0, ); const areInscriptionsRareSatsInPayment = inscriptionsRareSatsInPayment.length > 0; - const showPaymentSection = areInscriptionsRareSatsInPayment || netAmount > 0; + const amountIsBiggerThanZero = netAmount > 0; + const showPaymentSection = areInscriptionsRareSatsInPayment || amountIsBiggerThanZero; return ( <> @@ -98,7 +99,7 @@ function ReceiveSection({ outputs, netAmount, onShowInscription }: Props) { {t('YOUR_PAYMENT_ADDRESS')} - {netAmount > 0 && ( + {amountIsBiggerThanZero && ( @@ -113,7 +114,7 @@ function ReceiveSection({ outputs, netAmount, onShowInscription }: Props) { satributes={output.satributes} amount={output.amount} onShowInscription={onShowInscription} - showTopDivider={areInscriptionsRareSatsInPayment && index === 0} + showTopDivider={amountIsBiggerThanZero && index === 0} showBottomDivider={inscriptionsRareSatsInPayment.length > index + 1} /> ))}