Skip to content

Commit

Permalink
fix: remove polygon mumbai as it is deprecated (#328)
Browse files Browse the repository at this point in the history
* fix: remove polygon mumbai

* chore: set node version to latest version of node 14

* fix: bump tradetrust repos
  • Loading branch information
MinHtet-O authored Apr 25, 2024
1 parent e29bed9 commit 6396281
Show file tree
Hide file tree
Showing 13 changed files with 3,042 additions and 2,172 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.11.0
14
1 change: 1 addition & 0 deletions nodejs-polyfill-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
5,169 changes: 3,028 additions & 2,141 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
"@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/token-registry": "^4.10.1",
"@tradetrust-tt/tradetrust": "^6.9.4",
"@tradetrust-tt/tradetrust-cli": "^2.18.1",
"@tradetrust-tt/tradetrust-ui-components": "^2.22.2",
"@tradetrust-tt/tradetrust-utils": "^1.13.2",
"@tradetrust-tt/tradetrust-utils": "^1.13.4",
"@tradetrust-tt/tt-verify": "^8.8.5",
"ajv": "^8.6.0",
"axios": "^0.21.4",
Expand Down
1 change: 0 additions & 1 deletion src/common/config/validate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const configFileSchema = Joi.object({
"local",
"sepolia",
"matic",
"maticmum",
"amoy",
"xdc",
"xdcapothem",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/components/NavigationBar/NavigationBar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 0 additions & 16 deletions src/constants/chainInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export enum ChainId {

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

// XDC Network
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/services/common/functions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Wallet } from "ethers";
import { ConnectedSigner } from "../../types";
import { connect } from "@tradetrust-tt/document-store";
import { DocumentStore } from "@tradetrust-tt/document-store/src/contracts/DocumentStore";
import { DocumentStore } from "@tradetrust-tt/document-store";
import { TradeTrustToken, TradeTrustToken__factory } from "@tradetrust-tt/token-registry/contracts";

export const checkAddressIsSmartContract = async (
Expand Down
4 changes: 2 additions & 2 deletions src/services/publishing/gas-price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -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);
Expand Down
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\"}}"
Expand All @@ -21,7 +21,7 @@
"location": "example.tradetrust.io"
},
"name": "DEMO TOKEN REGISTRY",
"tokenRegistry": "0x072FB36B73a7f52A23ea53162583f78ba3Bc6DEa"
"tokenRegistry": "0x71D28767662cB233F887aD2Bb65d048d760bA694"
}
]
},
Expand Down
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\"}}"
Expand All @@ -26,7 +26,7 @@
"proof": {
"type": "OpenAttestationProofMethod",
"method": "TOKEN_REGISTRY",
"value": "0x072FB36B73a7f52A23ea53162583f78ba3Bc6DEa"
"value": "0x71D28767662cB233F887aD2Bb65d048d760bA694"
},
"identityProof": {
"type": "DNS-TXT",
Expand Down
1 change: 0 additions & 1 deletion src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export type Network =
| "local"
| "sepolia"
| "matic"
| "maticmum"
| "amoy"
| "xdc"
| "xdcapothem"
Expand Down

0 comments on commit 6396281

Please sign in to comment.