From f5dbe8469c6afdede3fa94c81dbcf7d6abdfe34e Mon Sep 17 00:00:00 2001 From: Rahul Sethuram Date: Thu, 19 Dec 2024 17:46:22 +0400 Subject: [PATCH] fix: contract --- packages/sdk/src/IonicSdk/index.ts | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/sdk/src/IonicSdk/index.ts b/packages/sdk/src/IonicSdk/index.ts index 3e1c6415c..27127fbd5 100644 --- a/packages/sdk/src/IonicSdk/index.ts +++ b/packages/sdk/src/IonicSdk/index.ts @@ -125,14 +125,19 @@ export class IonicBase { address: this.chainDeployment.PoolLensSecondary.address as Address, client: this.publicClient }), - IonicLiquidator: - this.chainId === bob.id || this.chainId === lisk.id - ? ({} as any) - : getContract({ - abi: ionicUniV3LiquidatorAbi, - address: this.chainDeployment.IonicUniV3Liquidator.address as Address, - client: this.walletClient! - }), + IonicLiquidator: this.chainDeployment?.IonicUniV3Liquidator?.address + ? getContract({ + abi: ionicUniV3LiquidatorAbi, + address: this.chainDeployment.IonicUniV3Liquidator.address as Address, + client: this.walletClient! + }) + : this.chainDeployment?.IonicLiquidator?.address + ? getContract({ + abi: ionicLiquidatorAbi, + address: this.chainDeployment.IonicLiquidator.address as Address, + client: this.publicClient + }) + : ({} as any), FeeDistributor: getContract({ abi: feeDistributorAbi, address: this.chainDeployment.FeeDistributor.address as Address,