Skip to content

Commit

Permalink
Merge pull request #6310 from connext/fix-maticjs-tests
Browse files Browse the repository at this point in the history
fix: testnet mumbai is no longer supported
  • Loading branch information
wanglonghong authored Jul 16, 2024
2 parents 0772d22 + bf79374 commit c1bb1bc
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 c1bb1bc

Please sign in to comment.