fix -ve available to borrow and token stats value decimals

This commit is contained in:
saml33 2023-03-22 10:00:51 +11:00
parent 7c3580b6ab
commit 7750942ca5
3 changed files with 3 additions and 7 deletions

View File

@ -96,7 +96,6 @@ const AssetsBorrowsTable = () => {
<BankAmountWithValue
amount={borrows}
bank={bank}
fixDecimals={false}
stacked
/>
</div>
@ -104,9 +103,8 @@ const AssetsBorrowsTable = () => {
<Td>
<div className="flex flex-col text-right">
<BankAmountWithValue
amount={available}
amount={available > 0 ? available : 0}
bank={bank}
fixDecimals={false}
stacked
/>
</div>
@ -169,8 +167,7 @@ const AssetsBorrowsTable = () => {
{t('available')}
</p>
<BankAmountWithValue
amount={available}
fixDecimals={false}
amount={available > 0 ? available : 0}
bank={bank}
/>
</div>

View File

@ -134,7 +134,6 @@ const YourBorrowsTable = ({ banks }: { banks: BankWithBalance[] }) => {
<BankAmountWithValue
amount={available}
bank={bank}
fixDecimals={false}
stacked
/>
</Td>

View File

@ -25,7 +25,7 @@ const BankAmountWithValue = ({
<span className={`text-th-fgd-4 ${stacked ? 'block' : ''}`}>
<FormatNumericValue
value={value ? value : Number(amount) * bank.uiPrice}
decimals={2}
decimals={fixDecimals ? 2 : undefined}
isUsd={true}
/>
</span>