diff --git a/public/config/abi.json b/src/abi.json similarity index 100% rename from public/config/abi.json rename to src/abi.json diff --git a/public/config/config.json b/src/config.json similarity index 100% rename from public/config/config.json rename to src/config.json diff --git a/src/redux/blockchain/blockchainActions.js b/src/redux/blockchain/blockchainActions.js index 11368c655..9acefaa7f 100644 --- a/src/redux/blockchain/blockchainActions.js +++ b/src/redux/blockchain/blockchainActions.js @@ -1,6 +1,8 @@ // constants import Web3EthContract from "web3-eth-contract"; import Web3 from "web3"; +import abi from '../../abi'; +import CONFIG from '../../config'; // log import { fetchData } from "../data/dataActions"; @@ -34,20 +36,6 @@ const updateAccountRequest = (payload) => { export const connect = () => { return async (dispatch) => { dispatch(connectRequest()); - const abiResponse = await fetch("/config/abi.json", { - headers: { - "Content-Type": "application/json", - Accept: "application/json", - }, - }); - const abi = await abiResponse.json(); - const configResponse = await fetch("/config/config.json", { - headers: { - "Content-Type": "application/json", - Accept: "application/json", - }, - }); - const CONFIG = await configResponse.json(); const { ethereum } = window; const metamaskIsInstalled = ethereum && ethereum.isMetaMask; if (metamaskIsInstalled) {