Merge branch 'main' into dev
This commit is contained in:
commit
ed86f3b224
|
@ -103,15 +103,15 @@ export class Group {
|
|||
Promise.all([
|
||||
this.reloadBankOraclePrices(client),
|
||||
this.reloadVaults(client),
|
||||
this.reloadPerpMarkets(client, ids).then(() =>
|
||||
this.reloadPerpMarketOraclePrices(client),
|
||||
),
|
||||
]),
|
||||
),
|
||||
this.reloadMintInfos(client, ids),
|
||||
this.reloadSerum3Markets(client, ids).then(() =>
|
||||
this.reloadSerum3ExternalMarkets(client),
|
||||
),
|
||||
this.reloadPerpMarkets(client, ids).then(() =>
|
||||
this.reloadPerpMarketOraclePrices(client),
|
||||
),
|
||||
]);
|
||||
// console.timeEnd('group.reload');
|
||||
}
|
||||
|
@ -346,16 +346,16 @@ export class Group {
|
|||
) {
|
||||
const stubOracle = coder.decode('stubOracle', ai.data);
|
||||
price = new I80F48(stubOracle.price.val);
|
||||
uiPrice = this?.toUiPrice(price, baseDecimals);
|
||||
uiPrice = this.toUiPrice(price, baseDecimals);
|
||||
} else if (isPythOracle(ai)) {
|
||||
uiPrice = parsePriceData(ai.data).previousPrice;
|
||||
price = this?.toNativePrice(uiPrice, baseDecimals);
|
||||
price = this.toNativePrice(uiPrice, baseDecimals);
|
||||
} else if (isSwitchboardOracle(ai)) {
|
||||
uiPrice = await parseSwitchboardOracle(
|
||||
ai,
|
||||
client.program.provider.connection,
|
||||
);
|
||||
price = this?.toNativePrice(uiPrice, baseDecimals);
|
||||
price = this.toNativePrice(uiPrice, baseDecimals);
|
||||
} else {
|
||||
throw new Error(
|
||||
`Unknown oracle provider (parsing not implemented) for oracle ${oracle}, with owner ${ai.owner}!`,
|
||||
|
|
Loading…
Reference in New Issue