Skip to content

Commit

Permalink
Remove inscribed sats warning (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
victorkirov authored Oct 1, 2024
1 parent d3c524d commit ac2ffc9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ export default function AmountWithInscriptionSatribute({

const amountOfAssets = satributesArray.length + inscriptions.length;

return amountOfAssets > 0 ? (
if (amountOfAssets === 0) {
return null;
}

return (
<WarningContainer>
<WarningButton type="button" onClick={() => setShowBundleDetail((prevState) => !prevState)}>
<Row>
Expand Down Expand Up @@ -165,5 +169,5 @@ export default function AmountWithInscriptionSatribute({
</ItemsContainer>
)}
</WarningContainer>
) : null;
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -87,11 +86,6 @@ function ReceiveSection({ onShowInscription }: Props) {
noMargin={!runes.length && !inscriptions.length && !satributes.length}
>
<Amount amount={btcSatsAmount} />
<AmountWithInscriptionSatribute
inscriptions={inscriptions}
satributes={satributes}
onShowInscription={onShowInscription}
/>
</RowContainer>
)}
{txIsFinal &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -72,16 +71,7 @@ function SendSection({
: transfer.destinationType}
</StyledP>
</SubHeader>
{transfer.btcSatsAmount > 0 && (
<>
<Amount amount={transfer.btcSatsAmount} />
<AmountWithInscriptionSatribute
inscriptions={[]}
satributes={[]}
onShowInscription={onShowInscription}
/>
</>
)}
{transfer.btcSatsAmount > 0 && <Amount amount={transfer.btcSatsAmount} />}
{transfer.bundles.map((bundle) => (
<>
<SubHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -110,11 +109,6 @@ function TransferSection({ onShowInscription }: Props) {
noMargin={!runes.length && !inscriptions.length && !satributes.length}
>
<Amount amount={btcSatsAmount} />
<AmountWithInscriptionSatribute
inscriptions={inscriptions}
satributes={satributes}
onShowInscription={onShowInscription}
/>
<WarningContainer>
<WarningOctagon weight="fill" color={Theme.colors.caution} size={16} />
<WarningText typography="body_medium_s" color="caution">
Expand Down

0 comments on commit ac2ffc9

Please sign in to comment.