From 93f5f75d45ed262af768dca9bb5ba210c8934a2d Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sun, 5 May 2024 13:56:54 +1000 Subject: [PATCH] chore: remove Testnet Ceres (next.aeternity.io) --- src/lib/networksRegistry.js | 13 +------------ src/store/plugins/initSdk.js | 11 +---------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/lib/networksRegistry.js b/src/lib/networksRegistry.js index 86e5c3680..cd51f7b51 100644 --- a/src/lib/networksRegistry.js +++ b/src/lib/networksRegistry.js @@ -12,15 +12,6 @@ const testNetwork = { explorerUrl: 'https://testnet.aescan.io', }; -// Source https://forum.aeternity.com/t/the-proposed-changes-in-ceres-protocol/12056/33 -const testCeresNetworkHideAt = new Date('2024-04-30'); -const testCeresNetwork = { - name: `Testnet Ceres (till ${testCeresNetworkHideAt.toLocaleDateString()})`, - url: 'https://next.aeternity.io', - middlewareUrl: 'https://next.aeternity.io:8443', - explorerUrl: 'https://explorer.ceres.aepps.com', -}; - const envNetwork = { name: process.env.VUE_APP_NETWORK_NAME, url: process.env.VUE_APP_NODE_URL, @@ -33,10 +24,8 @@ const networks = (() => { return [window.overrideNetwork]; } if (envNetwork.name) return [envNetwork]; - const list = process.env.NODE_ENV === 'production' + return process.env.NODE_ENV === 'production' ? [mainNetwork, testNetwork] : [testNetwork, mainNetwork]; - if (Date.now() < testCeresNetworkHideAt) list.push(testCeresNetwork); - return list; })(); export default Object.freeze(networks.map(Object.freeze)); diff --git a/src/store/plugins/initSdk.js b/src/store/plugins/initSdk.js index f2a0848fe..2d37fb541 100644 --- a/src/store/plugins/initSdk.js +++ b/src/store/plugins/initSdk.js @@ -127,16 +127,7 @@ export default (store) => { delete spec.paths['/names/pointees/{id}']; return genSwaggerClient(specUrl, { spec }); })(), - // TODO: replace with `genSwaggerClient(`${network.middlewareUrl}/v2/api`)` - // after removing next.aeternity.io - (async () => { - const specUrl = `${network.middlewareUrl}/v2/api`; - const spec = await fetchJson(specUrl); - if (network.middlewareUrl === 'https://next.aeternity.io:8443') { - spec.servers[0].url = spec.servers[0].url.replace('/mdw', ''); - } - return genSwaggerClient(specUrl, { spec }); - })(), + genSwaggerClient(`${network.middlewareUrl}/v2/api`), ]); // TODO: remove after updating sdk sdk.Ae.defaults.verify = false;