Skip to content

Commit

Permalink
Merge pull request #1554 from aeternity/remove-ceres-testnet
Browse files Browse the repository at this point in the history
chore: remove Testnet Ceres (next.aeternity.io)
  • Loading branch information
davidyuk authored May 5, 2024
2 parents c3afc92 + 93f5f75 commit bfca851
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
13 changes: 1 addition & 12 deletions src/lib/networksRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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));
11 changes: 1 addition & 10 deletions src/store/plugins/initSdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bfca851

Please sign in to comment.