Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove polygon mumbai
Browse files Browse the repository at this point in the history
MinHtet-O committed Apr 17, 2024
1 parent e29bed9 commit baa558b
Showing 11 changed files with 46,345 additions and 29,886 deletions.
1 change: 1 addition & 0 deletions nodejs-polyfill-webpack.js
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ module.exports = {
fallback: (config) => {
return {
...config.resolve.fallback,
vm: require.resolve("vm-browserify"),
stream: require.resolve("stream-browserify"),
buffer: require.resolve("buffer"),
stream: require.resolve("stream-browserify"),
76,185 changes: 46,330 additions & 29,855 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -53,11 +53,11 @@
"@hapi/joi": "^17.1.1",
"@rjsf/core": "^3.1.0",
"@tradetrust-tt/decentralized-renderer-react-components": "^3.14.1",
"@tradetrust-tt/dnsprove": "^2.12.2",
"@tradetrust-tt/document-store": "^2.7.0",
"@tradetrust-tt/token-registry": "^4.9.0",
"@tradetrust-tt/tradetrust": "^6.9.1",
"@tradetrust-tt/tradetrust-cli": "^2.18.1",
"@tradetrust-tt/dnsprove": "^2.12.3",
"@tradetrust-tt/document-store": "^3.2.0",
"@tradetrust-tt/token-registry": "^4.10.0",
"@tradetrust-tt/tradetrust": "6.9.1",
"@tradetrust-tt/tradetrust-cli": "^2.21.1",
"@tradetrust-tt/tradetrust-ui-components": "^2.22.2",
"@tradetrust-tt/tradetrust-utils": "^1.13.2",
"@tradetrust-tt/tt-verify": "^8.8.5",
@@ -144,6 +144,7 @@
"tmp": "^0.2.1",
"ts-node": "^10.4.0",
"typescript": "^4.3.2",
"vm-browserify": "^1.1.2",
"wait-on": "^6.0.0",
"webpack": "^5.73.0"
}
1 change: 0 additions & 1 deletion src/common/config/validate.tsx
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ const configFileSchema = Joi.object({
"local",
"sepolia",
"matic",
"maticmum",
"amoy",
"xdc",
"xdcapothem",
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import { v2 } from "@tradetrust-tt/tradetrust";
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import { useConfigContext } from "../../../common/context/config";
import { checkContractOwnership } from "../../../services/prechecks";
import sampleConfig from "../../../test/fixtures/config/v3/sample-config-mumbai.json";
import sampleConfig from "../../../test/fixtures/config/v3/sample-config-amoy.json";
import { FormTemplate } from "../../../types";
import { FormSelect } from "./FormSelect";

2 changes: 1 addition & 1 deletion src/components/NavigationBar/NavigationBar.test.tsx
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import { render, screen } from "@testing-library/react";
import { BrowserRouter, Route } from "react-router-dom";
import { NavigationBar } from "./NavigationBar";

import config from "../../test/fixtures/config/v3/sample-config-mumbai.json";
import config from "../../test/fixtures/config/v3/sample-config-amoy.json";

const mockMainnetConfig = {
network: "homestead",
16 changes: 0 additions & 16 deletions src/constants/chainInfo.tsx
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ export enum ChainId {

// Polygon
Polygon = 137,
PolygonMumbai = 80001,
Amoy = 80002,

// XDC Network
@@ -88,20 +87,6 @@ export const ChainInfo: ChainInfo = {
decimals: 18,
},
},
[ChainId.PolygonMumbai]: {
label: "Polygon Mumbai",
chain: "MATIC",
chainId: ChainId.PolygonMumbai,
networkName: "maticmum",
explorerUrl: "https://mumbai.polygonscan.com",
explorerApiUrl: "https://api-testnet.polygonscan.com",
rpcUrl: "https://rpc-mumbai.maticvigil.com/",
nativeCurrency: {
name: "MATIC",
symbol: "mMATIC",
decimals: 18,
},
},
[ChainId.Amoy]: {
label: "Amoy",
chain: "MATIC",
@@ -211,7 +196,6 @@ export const supportedMainnet = [

export const supportedTestnet = [
ChainInfo[ChainId.Sepolia].networkName,
ChainInfo[ChainId.PolygonMumbai].networkName,
ChainInfo[ChainId.Amoy].networkName,
ChainInfo[ChainId.XDCApothem].networkName,
ChainInfo[ChainId.HederaTestnet].networkName,
4 changes: 2 additions & 2 deletions src/services/publishing/gas-price.ts
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ export const fetchGasPriceSuggestions = async (
const network = getSupportedNetworkNameFromId(chainId);
const chainInfo = getNetworkDetails(network);
const etherscanDetails = getEtherscanNetworkApiDetails(chainInfo);
const isPolygon = ["maticmum", "matic", "amoy"].includes(network);
const isPolygon = ["matic", "amoy"].includes(network);
const isMainnet = ["homestead"].includes(network);
const isStability = ["stability", "stabilitytestnet"].includes(network);
if (!isMainnet && !isPolygon && !isStability) return { ...additionalOverrides };
@@ -63,7 +63,7 @@ export const fetchStabilityNetworkSuggestedPrice = async (network: Network): Pro
};

const fetchPolygonGasStationSuggestedPrice = async (network: Network): Promise<SuggestedGasPrice> => {
const testnetURL = network === ("maticmum" || "amoy") ? "-testnet" : "";
const testnetURL = network === "amoy" ? "-testnet" : "";
const apiUrl = "https://gasstation" + testnetURL + ".polygon.technology/v2";

const suggestedPriceResponse = await fetch(apiUrl);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"network": "maticmum",
"network": "amoy",
"wallet": {
"type": "ENCRYPTED_JSON",
"encryptedJson": "{\"address\":\"ca93690bb57eeab273c796a9309246bc0fb93649\",\"id\":\"712120d0-23ab-4725-9824-74fce4a8fdb5\",\"version\":3,\"crypto\":{\"cipher\":\"aes-128-ctr\",\"cipherparams\":{\"iv\":\"bcafe203a881775bfd9c1e377ec36b6d\"},\"ciphertext\":\"29c3a1e3ba52ffee4bfb03b21e5ec8530b0ce4d72c678507cdbc5948b721a946\",\"kdf\":\"scrypt\",\"kdfparams\":{\"salt\":\"98e5ae869e66f32acac0a0ec92aa4f27a51f721d251274e45657e73eb6cb659b\",\"n\":131072,\"dklen\":32,\"p\":1,\"r\":8},\"mac\":\"6467b42caddfb6430aea5bf0a439282856b090202b213642727edb351a923458\"},\"x-ethers\":{\"client\":\"ethers.js\",\"gethFilename\":\"UTC--2023-05-30T06-12-39.0Z--ca93690bb57eeab273c796a9309246bc0fb93649\",\"mnemonicCounter\":\"95712e42ed2478f6ccad165ebc7777d5\",\"mnemonicCiphertext\":\"3ed74121b8bcdb3d3004169f759176ef\",\"path\":\"m/44'/60'/0'/0/0\",\"locale\":\"en\",\"version\":\"0.1\"}}"
@@ -21,7 +21,7 @@
"location": "example.tradetrust.io"
},
"name": "DEMO TOKEN REGISTRY",
"tokenRegistry": "0x072FB36B73a7f52A23ea53162583f78ba3Bc6DEa"
"tokenRegistry": "0x71D28767662cB233F887aD2Bb65d048d760bA694"
}
]
},
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"network": "maticmum",
"network": "amoy",
"wallet": {
"type": "ENCRYPTED_JSON",
"encryptedJson": "{\"address\":\"ca93690bb57eeab273c796a9309246bc0fb93649\",\"id\":\"712120d0-23ab-4725-9824-74fce4a8fdb5\",\"version\":3,\"crypto\":{\"cipher\":\"aes-128-ctr\",\"cipherparams\":{\"iv\":\"bcafe203a881775bfd9c1e377ec36b6d\"},\"ciphertext\":\"29c3a1e3ba52ffee4bfb03b21e5ec8530b0ce4d72c678507cdbc5948b721a946\",\"kdf\":\"scrypt\",\"kdfparams\":{\"salt\":\"98e5ae869e66f32acac0a0ec92aa4f27a51f721d251274e45657e73eb6cb659b\",\"n\":131072,\"dklen\":32,\"p\":1,\"r\":8},\"mac\":\"6467b42caddfb6430aea5bf0a439282856b090202b213642727edb351a923458\"},\"x-ethers\":{\"client\":\"ethers.js\",\"gethFilename\":\"UTC--2023-05-30T06-12-39.0Z--ca93690bb57eeab273c796a9309246bc0fb93649\",\"mnemonicCounter\":\"95712e42ed2478f6ccad165ebc7777d5\",\"mnemonicCiphertext\":\"3ed74121b8bcdb3d3004169f759176ef\",\"path\":\"m/44'/60'/0'/0/0\",\"locale\":\"en\",\"version\":\"0.1\"}}"
@@ -26,7 +26,7 @@
"proof": {
"type": "OpenAttestationProofMethod",
"method": "TOKEN_REGISTRY",
"value": "0x072FB36B73a7f52A23ea53162583f78ba3Bc6DEa"
"value": "0x71D28767662cB233F887aD2Bb65d048d760bA694"
},
"identityProof": {
"type": "DNS-TXT",
1 change: 0 additions & 1 deletion src/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ export type Network =
| "local"
| "sepolia"
| "matic"
| "maticmum"
| "amoy"
| "xdc"
| "xdcapothem"

0 comments on commit baa558b

Please sign in to comment.