diff --git a/src/baseClient.ts b/src/baseClient.ts index 6e9d3f7..4c78329 100644 --- a/src/baseClient.ts +++ b/src/baseClient.ts @@ -72,6 +72,7 @@ export default abstract class BaseClient { await init("herumi"); await this._sync(); + await this.getLatestExecution(false); } public getCurrentPeriod(): number { @@ -187,8 +188,10 @@ export default abstract class BaseClient { } } - async getLatestExecution(): Promise { - await this._sync(); + async getLatestExecution(sync = true): Promise { + if (sync) { + await this._sync(); + } const getExecInfo = (u: OptimisticUpdate) => { return {