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

View File

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

View File

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