From bf793743b343974352b87c7ca4025b04dbdfa37c Mon Sep 17 00:00:00 2001 From: wanglonghong Date: Tue, 16 Jul 2024 21:59:37 +0800 Subject: [PATCH] fix: testnet not supported --- packages/utils/src/maticjs/client.ts | 7 +++++-- packages/utils/test/maticjs/client.spec.ts | 10 ++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/utils/src/maticjs/client.ts b/packages/utils/src/maticjs/client.ts index 190fa87b39..69c96fea8d 100644 --- a/packages/utils/src/maticjs/client.ts +++ b/packages/utils/src/maticjs/client.ts @@ -7,8 +7,11 @@ use(Web3ClientPlugin); // get matic and maticPoS clients from maticjs export const initMatic = async (isMainnet: boolean, maticRPC: string, ethereumRPC: string): Promise => { - const _network = isMainnet ? "mainnet" : "testnet"; - const _version = isMainnet ? "v1" : "mumbai"; + // const _network = isMainnet ? "mainnet" : "testnet"; + // const _version = isMainnet ? "v1" : "mumbai"; + + const _network = "mainnet"; + const _version = "v1"; const maticConfig = { network: _network, diff --git a/packages/utils/test/maticjs/client.spec.ts b/packages/utils/test/maticjs/client.spec.ts index d558c28953..ea656cfd66 100644 --- a/packages/utils/test/maticjs/client.spec.ts +++ b/packages/utils/test/maticjs/client.spec.ts @@ -7,8 +7,8 @@ describe("maticjs:client", () => { type InitMaticTestCase = { title: string; isMainnet: boolean; - expectedNetwork: "mainnet" | "testnet"; - expectedVersion: "v1" | "mumbai"; + expectedNetwork: "mainnet"; + expectedVersion: "v1"; }; const testCases: InitMaticTestCase[] = [ @@ -18,12 +18,6 @@ describe("maticjs:client", () => { expectedNetwork: "mainnet", expectedVersion: "v1", }, - { - title: "should work for testnet", - isMainnet: false, - expectedNetwork: "testnet", - expectedVersion: "mumbai", - }, ]; for (const { isMainnet, expectedNetwork, expectedVersion, title } of testCases) { it(title, async () => {