fix -ve available to borrow and token stats value decimals
This commit is contained in:
parent
7c3580b6ab
commit
7750942ca5
|
@ -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>
|
||||
|
|
|
@ -134,7 +134,6 @@ const YourBorrowsTable = ({ banks }: { banks: BankWithBalance[] }) => {
|
|||
<BankAmountWithValue
|
||||
amount={available}
|
||||
bank={bank}
|
||||
fixDecimals={false}
|
||||
stacked
|
||||
/>
|
||||
</Td>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue