From f68688ab6156cb1de781e7d5851215a4d0f72dc7 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 13 Jul 2023 04:32:18 -0400 Subject: [PATCH] refactor: have isSynced check the period and the block --- src/baseClient.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/baseClient.ts b/src/baseClient.ts index 8f6863d..6e9d3f7 100644 --- a/src/baseClient.ts +++ b/src/baseClient.ts @@ -58,7 +58,10 @@ export default abstract class BaseClient { } public get isSynced() { - return this._latestPeriod === this.getCurrentPeriod(); + return ( + this._latestPeriod === this.getCurrentPeriod() && + this.getLastBlock() === this.getCurrentBlock() + ); } public get store(): IStore {