From ac7b66f188d3304c32e598792e6b5a18d3a46d9f Mon Sep 17 00:00:00 2001 From: Karim Dalaize Date: Wed, 6 Mar 2024 17:30:53 +0100 Subject: [PATCH] =?UTF-8?q?[Fixed]=C2=A0Dust=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MySavings/MySavings.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/MySavings/MySavings.tsx b/src/pages/MySavings/MySavings.tsx index 846f388..57f3881 100644 --- a/src/pages/MySavings/MySavings.tsx +++ b/src/pages/MySavings/MySavings.tsx @@ -32,7 +32,7 @@ const MySavings = () => { useSelector((state: RootState) => ({ lumWallet: state.wallet.lumWallet, otherWallets: state.wallet.otherWallets, - balances: state.wallet.lumWallet?.balances.filter((balance) => state.pools.pools.find((pool) => pool.nativeDenom === balance.denom) || balance.denom === MICRO_LUM_DENOM), + balances: state.wallet.lumWallet?.balances, activities: state.wallet.lumWallet?.activities, deposits: state.wallet.lumWallet?.deposits, prizes: state.wallet.lumWallet?.prizes, @@ -154,6 +154,7 @@ const MySavings = () => { const amount = NumbersUtils.convertUnitNumber(asset.amount); const bondedAmount = 0; const price = prices?.[normalDenom]; + const usdAmount = price ? amount * price : 0; return ( {
{icon ? {`${asset.denom} :
?
}
- + = 1000 ? '0,0' : '0,0.000')} /> {normalDenom.toUpperCase()} - {price ? numeral(amount * price).format('$0,0[.]00') : '$ --'} + {price ? numeral(usdAmount < 0.001 ? 0 : usdAmount).format('$0,0[.]00') : '$ --'}