diff --git a/src/services/OracleServiceV3.ts b/src/services/OracleServiceV3.ts index 04e2597..fe943cb 100644 --- a/src/services/OracleServiceV3.ts +++ b/src/services/OracleServiceV3.ts @@ -95,6 +95,11 @@ export default class OracleServiceV3 { return !!this.#feeds[token.toLowerCase() as Address]; } + // TODO: exposed for hotfix only + public getFeed(token: string): OracleEntry { + return this.#feeds[token.toLowerCase() as Address]!; + } + /** * Returns false if account has tokens without reserve price feeds for some tokens * @param ca diff --git a/src/services/RedstoneServiceV3.ts b/src/services/RedstoneServiceV3.ts index 769b6c6..e442038 100644 --- a/src/services/RedstoneServiceV3.ts +++ b/src/services/RedstoneServiceV3.ts @@ -129,8 +129,14 @@ export class RedstoneServiceV3 { { ticker }, `will update redstone ticker ${ticker.symbol} for ${symb}`, ); + // TODO: + // HOTFIX: sometimes ticker.dataId in sdk-gov is incorrect, prefer data from chain + const tickerFeedId = + this.oracle.getFeed(ticker.address)?.main?.dataFeedId ?? + ticker.dataId; + redstoneUpdates.push({ - dataFeedId: ticker.dataId, + dataFeedId: tickerFeedId, token: ticker.address, reserve: false, // tickers are always added as main feed }); diff --git a/src/services/scan/ScanServiceV3.ts b/src/services/scan/ScanServiceV3.ts index dda2ad7..4dea782 100644 --- a/src/services/scan/ScanServiceV3.ts +++ b/src/services/scan/ScanServiceV3.ts @@ -290,7 +290,7 @@ export class ScanServiceV3 extends AbstractScanService { `filtering liquidatable credit accounts from selection of ${accs.length}...`, ); // @ts-ignore - const mc = await this.publicClient.multicall({ + const mc = await this.client.pub.multicall({ blockNumber, allowFailure: true, contracts: accs.map(({ addr, creditManager }) => ({