fix issue where oracles with no deviation crash the dashboard

This commit is contained in:
Lou-Kamades 2023-12-13 11:56:27 -06:00
parent 23770e32f9
commit 7a45b4642b
No known key found for this signature in database
GPG Key ID: 87A166E4D7C01F30
1 changed files with 2 additions and 1 deletions

View File

@ -394,7 +394,8 @@ const Dashboard: NextPage = () => {
formattedBankValues.oracleConfFilter
}% (Last known confidence ${
bank._oracleLastKnownDeviation instanceof
I80F48
I80F48 &&
!bank._oracleLastKnownDeviation.isZero()
? bank._oracleLastKnownDeviation
?.div(bank.price)
.mul(I80F48.fromNumber(100))