Skip to content

Commit

Permalink
Merge pull request #65 from lum-network/hotfix/lum-900
Browse files Browse the repository at this point in the history
[LUM-900] Millions WebApp -> Check dusts display
  • Loading branch information
greedyboi authored Mar 7, 2024
2 parents e3060d2 + ac7b66f commit 6d6df8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/MySavings/MySavings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 (
<Collapsible
Expand All @@ -168,10 +169,10 @@ const MySavings = () => {
<div className='d-flex flex-row align-items-center'>
{icon ? <img src={icon} alt={`${asset.denom} icon`} className='denom-icon no-filter' /> : <div className='denom-unknown-icon no-filter'>?</div>}
<div className='d-flex flex-column asset-amount'>
<span>
<span title={amount.toString()}>
<SmallerDecimal nb={numeral(amount).format(amount >= 1000 ? '0,0' : '0,0.000')} /> {normalDenom.toUpperCase()}
</span>
<small className='p-0'>{price ? numeral(amount * price).format('$0,0[.]00') : '$ --'}</small>
<small className='p-0'>{price ? numeral(usdAmount < 0.001 ? 0 : usdAmount).format('$0,0[.]00') : '$ --'}</small>
</div>
</div>
<div className='action-buttons d-flex flex-column flex-sm-row align-items-stretch align-items-md-center justify-content-stretch justiy-content-md-between mt-3 mt-lg-0'>
Expand Down

0 comments on commit 6d6df8b

Please sign in to comment.