Skip to content

Commit

Permalink
fix: wrong variable used in validation to show top divider for first …
Browse files Browse the repository at this point in the history
…asset item in receive in payment section component (#762)
  • Loading branch information
fedeerbes authored Jan 22, 2024
1 parent 61af7b1 commit dbb2266
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/components/confirmBtcTransaction/receiveSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down Expand Up @@ -98,7 +99,7 @@ function ReceiveSection({ outputs, netAmount, onShowInscription }: Props) {
<AddressLabel typography="body_medium_m">{t('YOUR_PAYMENT_ADDRESS')}</AddressLabel>
</RowCenter>
</Header>
{netAmount > 0 && (
{amountIsBiggerThanZero && (
<RowContainer>
<Amount amount={netAmount} />
</RowContainer>
Expand All @@ -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}
/>
))}
Expand Down

0 comments on commit dbb2266

Please sign in to comment.