Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LUM-900] Millions WebApp -> Check dusts display #65

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading