Skip to content

Commit

Permalink
fix: low values
Browse files Browse the repository at this point in the history
  • Loading branch information
w84april committed Nov 21, 2024
1 parent 19a7805 commit 4cd628d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apps/common/components/Counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export function Counter({
onUpdate(value) {
let hasBeenSet = false;
valueRef.current = value;

if (value < 0.00001 && value > 0) {
node.textContent = '<0.00001';
return;
}

if (Number.isNaN(value) || value === 0) {
const formatedValue = formatAmount(0, idealDecimals, idealDecimals);
node.textContent = formatedValue;
Expand Down
3 changes: 2 additions & 1 deletion apps/vaults-v3/components/list/VaultsV3ListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -578,14 +578,15 @@ export function VaultStakedAmount({currentVault}: {currentVault: TYDaemonVault})
currentVault.staking.available,
getToken
]);

console.log(staked);
return (
<div className={'flex flex-col pt-0 text-right md:pt-8'}>
<p
className={`yearn--table-data-section-item-value ${
isZero(staked.raw) ? 'text-neutral-400' : 'text-neutral-900'
}`}>
<RenderAmount
shouldFormatDust
value={staked.normalized}
symbol={currentVault.token.symbol}
decimals={currentVault.token.decimals}
Expand Down

0 comments on commit 4cd628d

Please sign in to comment.