From b1eecadf4dc4eb63c43d5a1072bdc8fd1e8c042c Mon Sep 17 00:00:00 2001 From: Albert Andrejev Date: Wed, 18 Dec 2024 17:14:38 +0200 Subject: [PATCH] fix idle condition --- scripts/coordinator/src/modules/core/index.ts | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/coordinator/src/modules/core/index.ts b/scripts/coordinator/src/modules/core/index.ts index 7d49c2c6..c911bef3 100644 --- a/scripts/coordinator/src/modules/core/index.ts +++ b/scripts/coordinator/src/modules/core/index.ts @@ -96,13 +96,23 @@ export class CoreModule extends ManagerModule { const config = await this.coreContractClient.queryConfig(); - const lsmShareCanProcessOnIdle = - this.lsmShareBondProviderContractClient && - (await this.lsmShareBondProviderContractClient.queryCanProcessOnIdle()); + let lsmShareCanProcessOnIdle = false; + try { + lsmShareCanProcessOnIdle = + this.lsmShareBondProviderContractClient && + (await this.lsmShareBondProviderContractClient.queryCanProcessOnIdle()); + } catch (e) { + // + } - const nativeBondCanProcessOnIdle = - this.nativeBondProviderContractClient && - (await this.nativeBondProviderContractClient.queryCanProcessOnIdle()); + let nativeBondCanProcessOnIdle = false; + try { + nativeBondCanProcessOnIdle = + this.nativeBondProviderContractClient && + (await this.nativeBondProviderContractClient.queryCanProcessOnIdle()); + } catch (e) { + // + } if ( this.lastRun / 1000 <