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
|
<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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue