Skip to content

Commit

Permalink
support loading oracles with different sources
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan committed Dec 24, 2024
1 parent 28701e1 commit b2ab5f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,9 @@ export function getMarketsAndOracleInfosToLoad(
if (!perpMarketConfig) {
throw new Error(`Perp market config for ${idx} not found`);
}
const oracleKey = perpMarketConfig.oracle.toBase58();
const oracleKey =
perpMarketConfig.oracle.toBase58() +
getVariant(perpMarketConfig.oracleSource);
if (!oraclesTracked.has(oracleKey)) {
logger.info(`Tracking oracle ${oracleKey} for perp market ${idx}`);
oracleInfos.push({
Expand Down

0 comments on commit b2ab5f1

Please sign in to comment.