Skip to content

Commit

Permalink
fix: try get underlying price
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Jan 22, 2024
1 parent 6ceb0cd commit 4626798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subgraphs/venus/src/utilities/getTokenPriceCents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function getTokenPriceCents(eventAddress: Address, underlyingDecimals: i3
const mantissaDecimalFactor = 36 - underlyingDecimals;
const bdFactor = exponentToBigInt(mantissaDecimalFactor);
const oracle2 = PriceOracle.bind(oracleAddress);
const oracleUnderlyingPrice = oracle2.getUnderlyingPrice(eventAddress);
const oracleUnderlyingPrice = oracle2.try_getUnderlyingPrice(eventAddress);
if (oracleUnderlyingPrice.equals(BigInt.zero())) {
return oracleUnderlyingPrice;
}
Expand Down

0 comments on commit 4626798

Please sign in to comment.