Skip to content

Commit

Permalink
refactor: remove unused config, getNetwork in internal utils
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Dec 20, 2024
1 parent 324cba9 commit 4bc08a2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
15 changes: 0 additions & 15 deletions src/config/config.json

This file was deleted.

26 changes: 0 additions & 26 deletions src/utils/utils.js
Original file line number Diff line number Diff line change
@@ -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 };

0 comments on commit 4bc08a2

Please sign in to comment.