Skip to content

Commit

Permalink
feat: removal of hedera network
Browse files Browse the repository at this point in the history
  • Loading branch information
rongquan1 committed Dec 5, 2024
1 parent a0f0f4d commit 3a368f2
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 685 deletions.
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
"@reduxjs/toolkit": "^1.6.1",
"@tradetrust-tt/decentralized-renderer-react-components": "^3.14.3",
"@tradetrust-tt/document-store": "^4.1.0",
"@tradetrust-tt/token-registry": "^5.0.2",
"@tradetrust-tt/token-registry": "^5.1.0",
"@tradetrust-tt/tradetrust": "^6.9.7",
"@tradetrust-tt/tradetrust-ui-components": "^3.0.0",
"@tradetrust-tt/tradetrust-utils": "^2.0.0",
"@tradetrust-tt/tt-verify": "^9.1.0",
"@tradetrust-tt/tradetrust-utils": "^2.1.1",
"@tradetrust-tt/tt-verify": "^9.2.0",
"@trustvc/trustvc": "^1.0.0",
"@types/gtag.js": "0.0.8",
"buffer": "^6.0.3",
Expand Down
59 changes: 0 additions & 59 deletions public/static/demo/hederamainnet.tt

This file was deleted.

59 changes: 0 additions & 59 deletions public/static/demo/hederatestnet.tt

This file was deleted.

Binary file removed public/static/images/networks/hedera.png
Binary file not shown.
9 changes: 1 addition & 8 deletions src/config/chain-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,10 @@ export const MAIN_NETWORKS = [
ChainId.Ethereum, //
ChainId.Polygon,
ChainId.XDC,
// ChainId.HederaMainnet,
ChainId.Stability,
];

/**
* Supported networks in development environment
*/
export const TEST_NETWORKS = [
ChainId.Sepolia,
ChainId.Amoy,
ChainId.APOTHEM,
ChainId.StabilityTestnet,
// ChainId.HederaTestnet,
];
export const TEST_NETWORKS = [ChainId.Sepolia, ChainId.Amoy, ChainId.APOTHEM, ChainId.StabilityTestnet];
34 changes: 1 addition & 33 deletions src/constants/chain-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface ChainInfoObject {
export const InitialAddress = "0x0000000000000000000000000000000000000000";
export const BurnAddress = "0x000000000000000000000000000000000000dEaD";

export const AvailableBlockChains = ["ETH", "MATIC", "XDC", "HBAR", "FREE"];
export const AvailableBlockChains = ["ETH", "MATIC", "XDC", "FREE"];

type ChainInfo = Record<ChainId, ChainInfoObject>;

Expand All @@ -41,10 +41,6 @@ export enum ChainId {
// Stability
Stability = 101010,
StabilityTestnet = 20180427,

// Hedera Network
HederaMainnet = 295,
HederaTestnet = 296,
}

export const ChainInfo: ChainInfo = {
Expand Down Expand Up @@ -163,32 +159,4 @@ export const ChainInfo: ChainInfo = {
decimals: 18,
},
},
[ChainId.HederaMainnet]: {
label: "Hedera Mainnet",
chainId: ChainId.HederaMainnet,
iconImage: "/static/images/networks/hedera.png",
networkName: "hederamainnet",
networkLabel: "Hedera Mainnet",
explorerUrl: "https://hashscan.io/mainnet",
rpcUrl: "https://hedera-mainnet-json-rpc.krypc.com/",
nativeCurrency: {
name: "HBAR",
symbol: "HBAR",
decimals: 18,
},
},
[ChainId.HederaTestnet]: {
label: "Hedera Testnet",
chainId: ChainId.HederaTestnet,
iconImage: "/static/images/networks/hedera.png",
networkName: "hederatestnet",
networkLabel: "Hedera Testnet",
explorerUrl: "https://hashscan.io/testnet",
rpcUrl: "https://hedera-testnet-json-rpc.krypc.com/",
nativeCurrency: {
name: "HBAR",
symbol: "HBAR",
decimals: 18,
},
},
};
7 changes: 0 additions & 7 deletions src/test/dns-txt-verified.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,3 @@ test("sample document is rendered correctly when DNS TXT is verified", async ()
await validateIssuerTexts(["EXAMPLE.TRADETRUST.IO"]);
await validateIframeTexts(["INVOICE"]);
});

// test("sample document is rendered correctly when DNS TXT is verified for hederatestnet", async () => {
// await navigateToVerify();
// await uploadDocument("./fixture/hederatestnet/v2/invoice.json");
// await validateIssuerTexts(["TRUSTLV.ORG"]);
// await validateIframeTexts(["CERTIFICATE OF NON-MANIPULATION"]);
// });
15 changes: 0 additions & 15 deletions src/test/endorsement-chain.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,3 @@ test("Endorsement chain title and actions are rendered correctly", async (t) =>
await t.expect(SurrenderToIssuerAction.count).eql(1);
await t.expect(SurrenderAcceptedAction.count).eql(1);
});

// test("Endorsement chain title and actions are rendered correctly for hederatestnet, Token Registry V4", async (t) => {
// await navigateToVerify();
// await uploadDocument("./fixture/hederatestnet/v3/ebl-endorsement-chain.json");

// await validateIssuerTexts(["TRUSTLV.ORG"]);
// await t.wait(3000);
// await t.expect(ViewEndorsementChainButton.count).eql(1);
// await t.click(ViewEndorsementChainButton);

// // add wait 3000 due to endorsement chain component having a little latency because getting endorsement data
// await t.wait(3000);

// Selector("h4").withText(`"Only Token Registry V5 is supported"`);
// });
Loading

0 comments on commit 3a368f2

Please sign in to comment.