diff --git a/src/apps/pulse/components/Buy/Buy.tsx b/src/apps/pulse/components/Buy/Buy.tsx index 9e56be2c..0e800a8c 100644 --- a/src/apps/pulse/components/Buy/Buy.tsx +++ b/src/apps/pulse/components/Buy/Buy.tsx @@ -200,17 +200,17 @@ export default function Buy(props: BuyProps) { } = useTokenPnL( token && accountAddress && portfolioToken ? { - token: { - contract: token.address || '', - symbol: token.symbol, - decimals: token.decimals || 18, - balance: portfolioToken.balance || 0, - price: portfolioToken.price || 0, - }, - transactionsData, - walletAddress: accountAddress, - chainId: token.chainId, - } + token: { + contract: token.address || '', + symbol: token.symbol, + decimals: token.decimals || 18, + balance: portfolioToken.balance || 0, + price: portfolioToken.price || 0, + }, + transactionsData, + walletAddress: accountAddress, + chainId: token.chainId, + } : null ); @@ -245,7 +245,7 @@ export default function Buy(props: BuyProps) { const nativeToken = portfolioTokens.find( (t) => Number(getChainId(t.blockchain as MobulaChainNames)) === - maxStableCoinBalance.chainId && isNativeToken(t.contract) + maxStableCoinBalance.chainId && isNativeToken(t.contract) ); if (!nativeToken) { @@ -598,7 +598,7 @@ export default function Buy(props: BuyProps) { ? foundToken.decimals[0] || 18 : foundToken.decimals || 18, usdValue: foundToken.price?.toString() || '0', - dailyPriceChange: 0, + dailyPriceChange: foundToken.price_change_24h || 0, }; setBuyToken(tokenToSelect as SelectedToken); @@ -642,11 +642,11 @@ export default function Buy(props: BuyProps) { > {token ? (
- {token.symbol} -
-- {token.name} -
-+ {token.symbol} +
++ {token.name} +
++ ${token.usdValue} +
- {/* Bottom Row: Price and Change */} -- ${token.usdValue} -
- -= 0 +
= 0 ? 'text-[#5CFF93]' : 'text-[#FF366C]' - }`} - > - {Math.abs(token.dailyPriceChange).toFixed(2)}% -
+ }`} + > + {Math.abs(token.dailyPriceChange).toFixed(2)}% + +