Skip to content

Commit

Permalink
fix: show < 0.01 label for small positions
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Nov 27, 2023
1 parent 1b01d03 commit 1d20c04
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const AssetRow: FC<{
return false;
}

const alertRange = bank.info.state.price * 0.05;
const alertRange = bank.info.state.price * 0.1;
const lowerBound = bank.info.state.price - alertRange;
const upperBound = bank.info.state.price + alertRange;

Expand Down Expand Up @@ -546,7 +546,7 @@ const AssetRow: FC<{
<dl className="flex items-center text-accent-foreground mt-2 text-sm">
<dt className="mr-1.5">{userPosition.position.isLending ? "Lending" : "Borrowing"}</dt>
<dd className="mr-4 pr-4 border-accent-foreground/50 border-r text-white font-medium flex items-center gap-1.5">
{userPosition.position.amount < 0.01 && "< 0.00"}
{userPosition.position.amount < 0.01 && "< 0.01"}
{userPosition.position.amount >= 0.01 &&
numeralFormatter(userPosition.position.amount) + " " + bank.meta.tokenSymbol}
{userPosition.position.amount < 0.01 && (
Expand Down

0 comments on commit 1d20c04

Please sign in to comment.