From 27b099ba175fb20c25b5330523a948abd1a981fa Mon Sep 17 00:00:00 2001 From: lukema95 <867273263@qq.com> Date: Fri, 20 Dec 2024 15:25:58 +0800 Subject: [PATCH] support localhost --- packages/client/src/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/client.ts b/packages/client/src/client.ts index 59891dbb..27f8ad2d 100644 --- a/packages/client/src/client.ts +++ b/packages/client/src/client.ts @@ -156,7 +156,7 @@ export class ZetaChainClient { if (params.contracts) { this.contracts = params.contracts; - } else if (this.network === "localnet") { + } else if (this.network === "localnet" || this.network === "localhost") { throw new Error("Localnet contracts are required"); } else { this.contracts = this.network.includes("test") @@ -176,7 +176,7 @@ export class ZetaChainClient { } public getGatewayAddress(): string { - if (this.network === "localnet") { + if (this.network === "localnet" || this.network === "localhost") { const gateway = (this.contracts as LocalnetAddress[]).find( (item) => item.type === "gatewayZEVM" );