Skip to content

Commit

Permalink
fixup! feat(suite): display multitoken amount
Browse files Browse the repository at this point in the history
  • Loading branch information
enjojoy committed Nov 26, 2024
1 parent f4ee3ee commit 307a4d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/suite/src/components/suite/CoinBalance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import { FormattedCryptoAmount } from 'src/components/suite';
interface CoinBalanceProps {
value: string;
symbol: Account['symbol'] | (string & {});
justifyContent?: 'flex-end' | 'flex-start';
}

export const CoinBalance = ({ value, symbol }: CoinBalanceProps) => (
export const CoinBalance = ({ value, symbol, justifyContent }: CoinBalanceProps) => (
<FormattedCryptoAmount
value={value}
symbol={symbol}
isBalance
justifyContent={justifyContent}
data-testid={`@wallet/coin-balance/value-${symbol}`}
/>
);
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ export const AccountItem = forwardRef(
)}
</Row>
{isBalanceShown && type !== 'tokens' && (
<CoinBalance value={formattedBalance} symbol={symbol} />
<CoinBalance
value={formattedBalance}
symbol={symbol}
justifyContent="flex-start"
/>
)}
{!isBalanceShown && (
<Column alignItems="stretch" gap={spacings.xs}>
Expand Down

0 comments on commit 307a4d3

Please sign in to comment.