Skip to content

Commit

Permalink
frontend: hide estimate sign if conversion is btc or sat
Browse files Browse the repository at this point in the history
Until a transaction has 6 confirmations we do show a estimation sign
for the conversion amount as the exact time is still not final.

The user can optionally choose BTC or sat as conversion unit in
these cases no estimation sign is needed.
  • Loading branch information
thisconnect committed Jan 9, 2025
1 parent fb85631 commit afd8d93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontends/web/src/components/transactions/transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ const Amounts = ({
const conversionPrefix = amount.estimated ? '\u2248' : null; // ≈
const sendToSelf = type === 'send_to_self';
const conversionUnit = sendToSelf ? amount.unit : defaultCurrency;
const converstionIsFiat = conversionUnit !== 'BTC' && conversionUnit !== 'sat';

return (
<span className={`${styles.txAmountsColumn} ${styles[txTypeClass]}`}>
Expand All @@ -189,7 +190,7 @@ const Amounts = ({
<Arrow type="send_to_self" />
</span>
)}
{(conversionPrefix && !sendToSelf) && (
{(conversionPrefix && !sendToSelf && converstionIsFiat) && (
<span className={styles.txPrefix}>
{conversionPrefix}
{' '}
Expand Down

0 comments on commit afd8d93

Please sign in to comment.