From 4bc08a2ee8e43454fa0f6cfc4649fb0611ad20a1 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 20 Dec 2024 20:17:26 +0100 Subject: [PATCH] refactor: remove unused `config`, `getNetwork` in internal utils --- src/config/config.json | 15 --------------- src/utils/utils.js | 26 -------------------------- 2 files changed, 41 deletions(-) delete mode 100644 src/config/config.json diff --git a/src/config/config.json b/src/config/config.json deleted file mode 100644 index 5ab0bc92..00000000 --- a/src/config/config.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "localhostParams": { - "url": "http://localhost:3001", - "networkId": "ae_dev" - }, - "testNetParams": { - "url": "https://testnet.aeternity.io", - "networkId": "ae_uat" - }, - "mainNetParams": { - "url": "https://mainnet.aeternity.io", - "networkId": "ae_mainnet" - }, - "compilerUrl": "http://localhost:3080" -} diff --git a/src/utils/utils.js b/src/utils/utils.js index 611d4d61..54518b53 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1,28 +1,2 @@ -import { readFile } from "fs/promises"; - -const config = JSON.parse( - await readFile(new URL("../config/config.json", import.meta.url)), -); - -export function getNetwork(network) { - const networks = { - local: { - url: config.localhostParams.url, - networkId: config.localhostParams.networkId, - }, - testnet: { - url: config.testNetParams.url, - networkId: config.testNetParams.networkId, - }, - mainnet: { - url: config.mainNetParams.url, - networkId: config.mainNetParams.networkId, - }, - }; - - return networks[network]; -} - export const print = console.log; export const printError = console.error; -export { config };