[Internal] Add tagging support (#5911)

* Add tagging support

* Add example dao support for TWT

* Update info.json

* Rename daos => dao

* Update tags.json

* Update tag in TWT, governance/dao

* Update test

* Add staking-native tag

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
This commit is contained in:
Viktor Radchenko 2021-03-18 13:42:03 -07:00 committed by GitHub
parent 5e080073f4
commit 5f6fb5ed94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 42 additions and 20 deletions

View File

@ -21,5 +21,8 @@
"symbol": "ALGO", "symbol": "ALGO",
"type": "COIN", "type": "COIN",
"decimals": 6, "decimals": 6,
"status": "active" "status": "active",
"tags": [
"staking-native"
]
} }

View File

@ -21,5 +21,8 @@
"symbol": "BNB", "symbol": "BNB",
"type": "COIN", "type": "COIN",
"decimals": 8, "decimals": 8,
"status": "active" "status": "active",
"tags": [
"staking-native"
]
} }

View File

@ -21,5 +21,8 @@
"symbol": "ATOM", "symbol": "ATOM",
"type": "COIN", "type": "COIN",
"decimals": 6, "decimals": 6,
"status": "active" "status": "active",
"tags": [
"staking-native"
]
} }

View File

@ -21,5 +21,8 @@
"symbol": "KAVA", "symbol": "KAVA",
"type": "COIN", "type": "COIN",
"decimals": 6, "decimals": 6,
"status": "active" "status": "active",
"tags": [
"staking-native"
]
} }

View File

@ -12,6 +12,6 @@
"status": "active", "status": "active",
"id": "0x4B0F1812e5Df2A09796481Ff14017e6005508003", "id": "0x4B0F1812e5Df2A09796481Ff14017e6005508003",
"tags": [ "tags": [
"dao" "governance"
] ]
} }

View File

@ -21,5 +21,8 @@
"symbol": "XTZ", "symbol": "XTZ",
"type": "COIN", "type": "COIN",
"decimals": 6, "decimals": 6,
"status": "active" "status": "active",
"tags": [
"staking-native"
]
} }

View File

@ -21,5 +21,8 @@
"symbol": "TRX", "symbol": "TRX",
"type": "COIN", "type": "COIN",
"decimals": 6, "decimals": 6,
"status": "active" "status": "active",
"tags": [
"staking-native"
]
} }

View File

@ -15,20 +15,24 @@
"name": "NFT", "name": "NFT",
"description": "Non-fungible tokens or tokens associated with the NFT ecosystem." "description": "Non-fungible tokens or tokens associated with the NFT ecosystem."
}, },
"dao": { "governance": {
"name": "DAO", "name": "Governance",
"description": "Tokens that govern decentralized autonomous organizations (DAOs)." "description": "Tokens that used to participate in the governance process of the project."
}, },
"defi": { "defi": {
"name": "DeFi", "name": "DeFi",
"description": null "description": "Tokens that are used for variety of decentralized financial applications."
},
"creator": {
"name": "Creator",
"description": "Tokens by creators."
}, },
"staking": { "staking": {
"name": "Staking", "name": "Staking",
"description": "Tokens that are used for staking to receive rewards." "description": "Tokens that are used for staking to receive rewards."
},
"staking-native": {
"name": "Staking Native",
"description": "Coins/Blockchains that are used for staking to secure the network to receive rewards."
},
"privacy": {
"name": "Privacy",
"description": "Privacy tokens."
} }
} }

View File

@ -147,14 +147,14 @@ describe("Test status, tag values", () => {
}); });
test(`Test tag-values`, () => { test(`Test tag-values`, () => {
expect(isValidTagValue("defi")).toEqual(true); expect(isValidTagValue("defi")).toEqual(true);
expect(isValidTagValue("dao")).toEqual(true); expect(isValidTagValue("staking")).toEqual(true);
expect(isValidStatusValue("invalidvalue")).toEqual(false); expect(isValidStatusValue("invalidvalue")).toEqual(false);
expect(isValidStatusValue("DAO")).toEqual(false); expect(isValidStatusValue("STAKING")).toEqual(false);
expect(isValidStatusValue("")).toEqual(false); expect(isValidStatusValue("")).toEqual(false);
expect(isValidTagValues(["defi"])).toEqual(true); expect(isValidTagValues(["defi"])).toEqual(true);
expect(isValidTagValues(["dao"])).toEqual(true); expect(isValidTagValues(["staking"])).toEqual(true);
expect(isValidTagValues(["defi", "dao"])).toEqual(true); expect(isValidTagValues(["defi", "staking"])).toEqual(true);
expect(isValidTagValues(["invalid"])).toEqual(false); expect(isValidTagValues(["invalid"])).toEqual(false);
expect(isValidTagValues(["defi", "invalid"])).toEqual(false); expect(isValidTagValues(["defi", "invalid"])).toEqual(false);
}); });