Skip to content

Commit

Permalink
feat: removal of hedera network (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
rongquan1 authored Dec 4, 2024
1 parent ed2770c commit d2c2e70
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 3,246 deletions.
1,611 changes: 0 additions & 1,611 deletions build/hederatestnet/config-v2.json

This file was deleted.

1,102 changes: 0 additions & 1,102 deletions build/hederatestnet/config-v3.json

This file was deleted.

638 changes: 167 additions & 471 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"homepage": "https://github.com/TradeTrust/tradetrust-config#readme",
"devDependencies": {
"@netlify/functions": "^1.3.0",
"@tradetrust-tt/tradetrust": "^6.9.1",
"@tradetrust-tt/tradetrust-utils": "^1.14.1",
"@tradetrust-tt/tradetrust": "^6.9.7",
"@tradetrust-tt/tradetrust-utils": "^2.1.0",
"@types/jest": "^29.5.0",
"@types/node": "^18.15.10",
"@typescript-eslint/eslint-plugin": "^5.57.0",
Expand Down
10 changes: 3 additions & 7 deletions src/config-v2.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
"xdcapothem",
"stabilitytestnet",
"stability",
"hederatestnet",
"hederamainnet",
"astron"
"astron"
]
},
"wallet": {
Expand Down Expand Up @@ -226,7 +224,7 @@
"properties": {
"chain": {
"type": "string",
"enum": ["ETH", "MATIC", "XDC", "FREE", "HBAR", "ASTRON"]
"enum": ["ETH", "MATIC", "XDC", "FREE", "ASTRON"]
},
"chainId": {
"type": "string",
Expand All @@ -240,9 +238,7 @@
"51",
"20180427",
"101010",
"296",
"295",
"1338"
"1338"
]
}
}
Expand Down
10 changes: 3 additions & 7 deletions src/config-v3.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
"xdcapothem",
"stabilitytestnet",
"stability",
"hederatestnet",
"hederamainnet",
"astron"
"astron"
]
},
"wallet": {
Expand Down Expand Up @@ -190,7 +188,7 @@
"properties": {
"chain": {
"type": "string",
"enum": ["ETH", "MATIC", "XDC", "FREE", "HBAR", "ASTRON"]
"enum": ["ETH", "MATIC", "XDC", "FREE", "ASTRON"]
},
"chainId": {
"type": "string",
Expand All @@ -204,9 +202,7 @@
"51",
"20180427",
"101010",
"296",
"295",
"1338"
"1338"
]
}
}
Expand Down
9 changes: 0 additions & 9 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ export const buildData = [
dnsTransferableRecord: "example.com",
dnsDid: "example.com",
},
// Hedera Testnet
{
chainId: "296" as CHAIN_ID,
documentStoreAddress: "0x93092C2B449712281008112870063fF439367C00",
tokenRegistryAddress: "0xA594f6e10564e87888425c7CC3910FE1c800aB0B",
dnsVerifiable: "example.tradetrust.io",
dnsTransferableRecord: "example.tradetrust.io",
dnsDid: "example.tradetrust.io",
},
// Amoy
{
chainId: "80002" as CHAIN_ID,
Expand Down
1 change: 0 additions & 1 deletion src/generate-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const writeSamples = () => {
break;
case CHAIN_ID.amoy:
case CHAIN_ID.sepolia:
case CHAIN_ID.hederatestnet:
case CHAIN_ID.stabilitytestnet:
case CHAIN_ID.stability:
case CHAIN_ID.astron:
Expand Down
38 changes: 2 additions & 36 deletions test/updateForm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,7 @@ describe("updateFormV2", () => {
"0xabcDocumentStore"
);
});
it("should update the form from a verifiable document correctly for hederatesnet ", () => {
const updatedForm = updateFormV2({
chain: { currency: "HBAR", id: CHAIN_ID.hederatestnet },
wallet: { type: "ENCRYPTED_JSON", encryptedJson: walletString },
form: v2VerifiableDocumentForm,
documentStoreAddress: "0xabcDocumentStore",
tokenRegistryAddress: "0xabcTokenRegistry",
dnsVerifiable: "VerifiableDNS.com",
dnsDid: "DNSDID.com",
dnsTransferableRecord: "TransferableDNS.com",
});
expect(
updatedForm.defaults.issuers[0].identityProof.location
).toStrictEqual("VerifiableDNS.com");
expect(updatedForm.defaults.issuers[0].documentStore).toStrictEqual(
"0xabcDocumentStore"
);
});

it("should update the form from a DID verifiable document correctly", () => {
const updatedForm = updateFormV2({
chain: { currency: "ETH", id: CHAIN_ID.sepolia },
Expand Down Expand Up @@ -204,24 +187,7 @@ describe("updateFormV3", () => {
updatedForm.defaults.openAttestationMetadata.proof.value
).toStrictEqual("0xabcDocumentStore");
});
it("should update the form from a verifiable document correctly for hederatestnet", () => {
const updatedForm = updateFormV3({
chain: { currency: "HBAR", id: CHAIN_ID.hederatestnet },
wallet: { type: "ENCRYPTED_JSON", encryptedJson: walletString },
form: v3VerifiableDocumentForm,
documentStoreAddress: "0xabcDocumentStore",
tokenRegistryAddress: "0xabcTokenRegistry",
dnsVerifiable: "VerifiableDNS.com",
dnsDid: "DNSDID.com",
dnsTransferableRecord: "TransferableDNS.com",
});
expect(
updatedForm.defaults.openAttestationMetadata.identityProof.identifier
).toStrictEqual("VerifiableDNS.com");
expect(
updatedForm.defaults.openAttestationMetadata.proof.value
).toStrictEqual("0xabcDocumentStore");
});

it("should update the form from a DID verifiable document correctly", () => {
const updatedForm = updateFormV3({
chain: { currency: "ETH", id: CHAIN_ID.sepolia },
Expand Down

0 comments on commit d2c2e70

Please sign in to comment.