mirror of https://github.com/certusone/oyster.git
fix: remove nan
This commit is contained in:
parent
befb9b9851
commit
0d0b78d36f
|
@ -85,6 +85,7 @@ export function useBorrowedAmount(address?: string | PublicKey) {
|
|||
} else {
|
||||
result.ltv = 100 * result.borrowedInUSD / result.colateralInUSD;
|
||||
result.health = result.colateralInUSD * liquidationThreshold / 100 / result.borrowedInUSD;
|
||||
result.health = Number.isFinite(result.health) ? result.health : 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue