diff --git a/packages/ui-components/src/components/Wallet/Swap.tsx b/packages/ui-components/src/components/Wallet/Swap.tsx index 6d1e9811..774408db 100644 --- a/packages/ui-components/src/components/Wallet/Swap.tsx +++ b/packages/ui-components/src/components/Wallet/Swap.tsx @@ -696,175 +696,169 @@ const Swap: React.FC = ({ label={t('swap.description')} /> - - {allTokens.length > 0 && - sourceTokens.length === 0 && - onClickBuy && - onClickReceive ? ( - - - - ) : ( - <> - {showSwapIntro && ( - - {t('swap.introTitle')} - {t('swap.introContent')} - - )} - - $} - endAdornment={ - - } - /> - - 0 && + sourceTokens.length === 0 && + onClickBuy && + onClickReceive ? ( + + + + ) : ( + + {showSwapIntro && ( + + {t('swap.introTitle')} + {t('swap.introContent')} + + )} + + $} + endAdornment={ + - {destinationTokens - .filter(v => getTokenEntry(v, true)) - .map(v => ( - - - - ))} - - } - /> - + {sourceTokens + .filter(v => getTokenEntry(v)) + .map(v => ( + + + + ))} + + } + /> + + - {destinationTokenDescription || ''} + {sourceTokenDescription || ''} - - - - )} - + {sourceToken && ( + + {t('swap.balance')}:{' '} + + {getTokenEntry(sourceToken)?.value + ? getTokenEntry(sourceToken)?.value.toLocaleString( + 'en-US', + { + style: 'currency', + currency: 'USD', + }, + ) + : numeral(getTokenEntry(sourceToken)?.balance).format( + '0.[0000]', + )} + + + )} + + + + {txId ? ( + + ) : isLoading ? ( + + ) : ( + + )} + + $} + endAdornment={ + + } + /> + + + {destinationTokenDescription || ''} + + + + + )} {txId && (