Skip to content

Commit

Permalink
fix staking details on SC
Browse files Browse the repository at this point in the history
  • Loading branch information
radumojic committed Apr 23, 2024
1 parent 5907327 commit 69b5321
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/pages/AccountDetails/AccountStaking/AccountStaking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const AccountStaking = () => {
)
: [];

const needsData = address && stakingDataReady && address !== stateAddress;
const needsData = address && address !== stateAddress;
const hasStaking = showDelegation || showDelegationLegacy || showStake;
const isReady =
providerDataReady &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,31 @@ export const DonutChart = ({
}
];

const hasNoActiveStake = bNtotalLocked.isEqualTo(0);

return (
<>
<div className='staking-details-center'>
<h5 className='mb-1'>
{bNtotalLocked.isEqualTo(0) ? 'No staking' : 'Total Staked'}
{hasNoActiveStake ? 'No staking' : 'Total Staked'}
</h5>
<h6 className='mb-1'>
<FormatAmount
value={bNtotalLocked.toString(10)}
showUsdValue={false}
/>
</h6>
<div className='text-neutral-400 small mb-0'>
<FormatUSD
value={bNtotalLocked.toString(10)}
decimals={DECIMALS}
showPrefix={false}
/>
</div>
{!hasNoActiveStake && (
<>
<h6 className='mb-1'>
<FormatAmount
value={bNtotalLocked.toString(10)}
showUsdValue={false}
/>
</h6>
<div className='text-neutral-400 small mb-0'>
<FormatUSD
value={bNtotalLocked.toString(10)}
decimals={DECIMALS}
showPrefix={false}
/>
</div>
</>
)}
</div>
<Chart.Donut config={config} />
</>
Expand Down

0 comments on commit 69b5321

Please sign in to comment.