Skip to content

Commit

Permalink
adds ghostnet items
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrosGounis committed May 2, 2024
1 parent 88c975c commit 45830cc
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/discover/handle-discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import dataV3 from './storage/discover_data_v3.json'
import dataMainnetV4 from './storage/v4.mainnet.json'
import dataGhostnetV4 from './storage/v4.ghostnet.json'
import allCategory from './storage/discover_all_category.json'
import allCategoryNewSchema from './storage/v4-all-category.mainnet.json'
import allCategoryNewSchemaMainnet from './storage/v4-all-category.mainnet.json'
import allCategoryNewSchemaGhostnet from './storage/v4-all-category.ghostnet.json'

const HEADERS = {
"content-type": "application/json;charset=UTF-8",
Expand All @@ -20,14 +21,12 @@ function getDiscoverData(network: NETWORK, version: VERSIONS, showAll: boolean)
if (version === VERSIONS.V4) {
const isGhostnet = network === NETWORK.GHOSTNET
const data = isGhostnet ? dataGhostnetV4 : dataMainnetV4
return [
...((showAll && !isGhostnet) ? allCategoryNewSchema : []),
...data
]
const dataAllCategory = isGhostnet ? allCategoryNewSchemaGhostnet : allCategoryNewSchemaMainnet
return [...(showAll ? dataAllCategory : []), ...data]
}

return {
mainnet: [...(showAll ? allCategoryNewSchema : []), ...dataV3.mainnet],
mainnet: [...(showAll ? allCategoryNewSchemaMainnet : []), ...dataV3.mainnet],
ghostnet: dataV3.ghostnet
}
} else {
Expand Down
19 changes: 19 additions & 0 deletions src/discover/storage/v4-all-category.ghostnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[
{
"items": [
{
"title": "objkt.com",
"categories": [
"marketplace"
],
"squareLogoUri": "https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/3a42f131-8085-4647-af74-39a7129f8900/raw",
"wideLogoUri": "",
"webBannerUri": "",
"mobileBannerUri": "",
"projectUrl": "https://ghostnet.objkt.com/",
"description": "The best Tezos NFTs all in one place"
}
],
"title": "All"
}
]
29 changes: 29 additions & 0 deletions src/discover/storage/v4.ghostnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,34 @@
}
],
"title": "Featured"
},
{
"items": [
{
"title": "QuipuSwap",
"categories": [
"exchange"
],
"squareLogoUri": "https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/assets/img/quipuswap_logo/raw",
"wideLogoUri": "",
"webBannerUri": "",
"mobileBannerUri": "",
"projectUrl": "https://ghostnet.quipuswap.com/",
"description": "A decentralized exchange on Tezos"
},
{
"title": "Wtz.io",
"categories": [
"exchange"
],
"squareLogoUri": "https://imagedelivery.net/X6w5bi3ztwg4T4f6LG8s0Q/847fd695-0dc0-47f4-e721-d948a5513000/raw",
"wideLogoUri": "",
"webBannerUri": "",
"mobileBannerUri": "",
"projectUrl": "https://ghostnet.wtz.io/",
"description": "“Ghostnet version of Crunchy’s wrapped XTZ"
}
],
"title": "DeFi"
}
]

0 comments on commit 45830cc

Please sign in to comment.