diff --git a/package.json b/package.json index 341ac7c2..0d034aa1 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "sideEffects": false, "type": "module", - "version": "0.2.18", + "version": "0.2.19-beta.0", "workspaces": [ "packages/*" ], diff --git a/packages/chain-list-assets/package.json b/packages/chain-list-assets/package.json index 565d2444..8650edf2 100644 --- a/packages/chain-list-assets/package.json +++ b/packages/chain-list-assets/package.json @@ -20,6 +20,6 @@ "./detectPackage.cjs" ], "type": "module", - "version": "0.2.18", + "version": "0.2.19-beta.0", "main": "index.js" } diff --git a/packages/chain-list/package.json b/packages/chain-list/package.json index e152803c..f0efd897 100644 --- a/packages/chain-list/package.json +++ b/packages/chain-list/package.json @@ -20,7 +20,7 @@ "./detectPackage.cjs" ], "type": "module", - "version": "0.2.18", + "version": "0.2.19-beta.0", "main": "index.js", "dependencies": { "@polkadot/dev": "0.67.167", diff --git a/packages/chain-list/src/packageInfo.ts b/packages/chain-list/src/packageInfo.ts index 03ca602a..0f6ec1f0 100644 --- a/packages/chain-list/src/packageInfo.ts +++ b/packages/chain-list/src/packageInfo.ts @@ -3,4 +3,4 @@ // Do not edit, auto-generated by @polkadot/dev -export const packageInfo = { name: '@subwallet/chain-list', path: 'auto', type: 'auto', version: '0.2.18' }; +export const packageInfo = { name: '@subwallet/chain-list', path: 'auto', type: 'auto', version: '0.2.19-beta.0' }; diff --git a/scripts/strapi/fetch-chains.mjs b/scripts/strapi/fetch-chains.mjs index 43ba3871..2d80e4a0 100755 --- a/scripts/strapi/fetch-chains.mjs +++ b/scripts/strapi/fetch-chains.mjs @@ -1,11 +1,11 @@ -import {gql} from "graphql-request"; -import * as fs from "fs"; -import {DOWNLOAD_DIR, DOWNLOAD_LINK, downloadFile, graphQLClient, removeDir, writeJSONFile} from "./strapi-api.mjs"; +import {DOWNLOAD_DIR, DOWNLOAD_LINK, downloadFile, writeJSONFile} from "./strapi-api.mjs"; +const BRANCH_NAME = process.env.BRANCH_NAME || 'dev'; const SAVE_PATH = './packages/chain-list/src/data/ChainInfo.json'; const main = async () => { - const results = await fetch('https://content.subwallet.app/api/list/chain'); + const apiUrl = BRANCH_NAME === 'master' ? 'https://content.subwallet.app/api/list/chain' : 'https://content.subwallet.app/api/list/chain?preview=true'; + const results = await fetch(apiUrl); const data = await results.json(); const downloadDir = `${DOWNLOAD_DIR}/chains`; const chains = await Promise.all(data.map(async chain => {