From bf53351edbc8c954aee59bc6f62111a5a4c29bf9 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Wed, 20 Sep 2023 14:03:28 -0300 Subject: [PATCH] chore: :shirt: --- subgraphs/venus/src/utilities/getBnbPriceInUsd.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/subgraphs/venus/src/utilities/getBnbPriceInUsd.ts b/subgraphs/venus/src/utilities/getBnbPriceInUsd.ts index 90622d01..d9d51242 100644 --- a/subgraphs/venus/src/utilities/getBnbPriceInUsd.ts +++ b/subgraphs/venus/src/utilities/getBnbPriceInUsd.ts @@ -1,15 +1,18 @@ import { Address, BigDecimal } from '@graphprotocol/graph-ts'; import { PriceOracle } from '../../generated/templates/VToken/PriceOracle'; +import { mantissaFactorBigDecimal } from '../constants'; import { vBnbAddress } from '../constants/addresses'; import { getOrCreateComptroller } from '../operations/getOrCreate'; -import { mantissaFactorBigDecimal } from '../constants'; export function getBnbPriceInUsd(): BigDecimal { const comptroller = getOrCreateComptroller(); const oracleAddress = Address.fromBytes(comptroller.priceOracle); -const oracle = PriceOracle.bind(oracleAddress); - const bnbPriceInUSD = oracle.getUnderlyingPrice(vBnbAddress).toBigDecimal().div(mantissaFactorBigDecimal); + const oracle = PriceOracle.bind(oracleAddress); + const bnbPriceInUSD = oracle + .getUnderlyingPrice(vBnbAddress) + .toBigDecimal() + .div(mantissaFactorBigDecimal); return bnbPriceInUSD; }