diff --git a/src/parachain/oracle.ts b/src/parachain/oracle.ts index 5203446bc..890d8982c 100644 --- a/src/parachain/oracle.ts +++ b/src/parachain/oracle.ts @@ -46,7 +46,7 @@ export interface OracleAPI { */ getLastExchangeRateTime(): Promise; /** - * @returns A map from the oracle's account id to its + * @returns A map from the oracle's account id to its name */ getSourcesById(): Promise>; /** @@ -82,7 +82,7 @@ export interface OracleAPI { * @returns The period of time (in milliseconds) after an oracle's last submission * during which it is considered online */ - getMaxDelay(): Promise; + getOnlineTimeout(): Promise; } export class DefaultOracleAPI implements OracleAPI { @@ -103,7 +103,7 @@ export class DefaultOracleAPI implements OracleAPI { return new Big(this.convertFromRawExchangeRate(rawRate.toString())); } - async getMaxDelay(): Promise { + async getOnlineTimeout(): Promise { const head = await this.api.rpc.chain.getFinalizedHead(); const moment = await this.api.query.exchangeRateOracle.maxDelay.at(head); return moment.toNumber(); diff --git a/test/mock/parachain/oracle.ts b/test/mock/parachain/oracle.ts index 8b0d210b2..5a9d19901 100644 --- a/test/mock/parachain/oracle.ts +++ b/test/mock/parachain/oracle.ts @@ -5,7 +5,7 @@ import Big from "big.js"; import { PolkaBTC } from "@interlay/polkabtc/interfaces"; export class MockOracleAPI implements OracleAPI { - getMaxDelay(): Promise { + getOnlineTimeout(): Promise { return Promise.resolve(100); }