From ac2ffc93728995c8199c6344fbf102d24ee6df07 Mon Sep 17 00:00:00 2001 From: Victor Kirov Date: Tue, 1 Oct 2024 16:03:30 +0300 Subject: [PATCH] Remove inscribed sats warning (#642) --- .../itemRow/amountWithInscriptionSatribute.tsx | 8 ++++++-- .../sections/receiveSection.tsx | 6 ------ .../confirmBtcTransaction/sections/sendSection.tsx | 12 +----------- .../sections/transferSection.tsx | 6 ------ 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/app/components/confirmBtcTransaction/itemRow/amountWithInscriptionSatribute.tsx b/src/app/components/confirmBtcTransaction/itemRow/amountWithInscriptionSatribute.tsx index 4767a094f..167bc0efc 100644 --- a/src/app/components/confirmBtcTransaction/itemRow/amountWithInscriptionSatribute.tsx +++ b/src/app/components/confirmBtcTransaction/itemRow/amountWithInscriptionSatribute.tsx @@ -106,7 +106,11 @@ export default function AmountWithInscriptionSatribute({ const amountOfAssets = satributesArray.length + inscriptions.length; - return amountOfAssets > 0 ? ( + if (amountOfAssets === 0) { + return null; + } + + return ( setShowBundleDetail((prevState) => !prevState)}> @@ -165,5 +169,5 @@ export default function AmountWithInscriptionSatribute({ )} - ) : null; + ); } diff --git a/src/app/components/confirmBtcTransaction/sections/receiveSection.tsx b/src/app/components/confirmBtcTransaction/sections/receiveSection.tsx index 13da41007..06e7dde8f 100644 --- a/src/app/components/confirmBtcTransaction/sections/receiveSection.tsx +++ b/src/app/components/confirmBtcTransaction/sections/receiveSection.tsx @@ -9,7 +9,6 @@ import { useTranslation } from 'react-i18next'; import styled from 'styled-components'; import { useTxSummaryContext } from '../hooks/useTxSummaryContext'; import Amount from '../itemRow/amount'; -import AmountWithInscriptionSatribute from '../itemRow/amountWithInscriptionSatribute'; import InscriptionSatributeRow from '../itemRow/inscriptionSatributeRow'; import RuneAmount from '../itemRow/runeAmount'; @@ -87,11 +86,6 @@ function ReceiveSection({ onShowInscription }: Props) { noMargin={!runes.length && !inscriptions.length && !satributes.length} > - )} {txIsFinal && diff --git a/src/app/components/confirmBtcTransaction/sections/sendSection.tsx b/src/app/components/confirmBtcTransaction/sections/sendSection.tsx index 95e921861..00dfaf9d1 100644 --- a/src/app/components/confirmBtcTransaction/sections/sendSection.tsx +++ b/src/app/components/confirmBtcTransaction/sections/sendSection.tsx @@ -6,7 +6,6 @@ import { NumericFormat } from 'react-number-format'; import styled from 'styled-components'; import { useTxSummaryContext } from '../hooks/useTxSummaryContext'; import Amount from '../itemRow/amount'; -import AmountWithInscriptionSatribute from '../itemRow/amountWithInscriptionSatribute'; import InscriptionSatributeRow from '../itemRow/inscriptionSatributeRow'; import RuneAmount from '../itemRow/runeAmount'; @@ -72,16 +71,7 @@ function SendSection({ : transfer.destinationType} - {transfer.btcSatsAmount > 0 && ( - <> - - - - )} + {transfer.btcSatsAmount > 0 && } {transfer.bundles.map((bundle) => ( <> diff --git a/src/app/components/confirmBtcTransaction/sections/transferSection.tsx b/src/app/components/confirmBtcTransaction/sections/transferSection.tsx index bd2d2046f..71d4b259c 100644 --- a/src/app/components/confirmBtcTransaction/sections/transferSection.tsx +++ b/src/app/components/confirmBtcTransaction/sections/transferSection.tsx @@ -11,7 +11,6 @@ import styled from 'styled-components'; import Theme from '../../../../theme'; import { useTxSummaryContext } from '../hooks/useTxSummaryContext'; import Amount from '../itemRow/amount'; -import AmountWithInscriptionSatribute from '../itemRow/amountWithInscriptionSatribute'; import InscriptionSatributeRow from '../itemRow/inscriptionSatributeRow'; import RuneAmount from '../itemRow/runeAmount'; @@ -110,11 +109,6 @@ function TransferSection({ onShowInscription }: Props) { noMargin={!runes.length && !inscriptions.length && !satributes.length} > -