Skip to content

Commit

Permalink
fix: testnet not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglonghong committed Jul 16, 2024
1 parent 6bfcc3a commit bf79374
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 5 additions & 2 deletions packages/utils/src/maticjs/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ use(Web3ClientPlugin);

// get matic and maticPoS clients from maticjs
export const initMatic = async (isMainnet: boolean, maticRPC: string, ethereumRPC: string): Promise<POSClient> => {
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,
Expand Down
10 changes: 2 additions & 8 deletions packages/utils/test/maticjs/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
Expand All @@ -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 () => {
Expand Down

0 comments on commit bf79374

Please sign in to comment.