use mmOracleData
This commit is contained in:
@@ -860,7 +860,7 @@ export const getEstimatedPrices = async (
|
|||||||
|
|
||||||
const oracleData = isSpot
|
const oracleData = isSpot
|
||||||
? driftClient.getOracleDataForSpotMarket(marketIndex)
|
? driftClient.getOracleDataForSpotMarket(marketIndex)
|
||||||
: driftClient.getOracleDataForPerpMarket(marketIndex);
|
: driftClient.getMMOracleDataForPerpMarket(marketIndex);
|
||||||
|
|
||||||
// Get oracle price
|
// Get oracle price
|
||||||
const oraclePrice = new BN(oracleData?.price || 0).mul(PRICE_PRECISION);
|
const oraclePrice = new BN(oracleData?.price || 0).mul(PRICE_PRECISION);
|
||||||
|
|||||||
Reference in New Issue
Block a user