From f338f4433f977bc3767b5fe2dfd4150e626fc577 Mon Sep 17 00:00:00 2001 From: Ryuji Eguchi Date: Wed, 29 Mar 2023 09:07:12 +1100 Subject: [PATCH] remove require("dotenv") to prevent error see: https://github.com/motdotla/dotenv/issues/581#issuecomment-1013508058 --- section7-kickstart-solc-0.8.9/ethereum/factory.js | 2 -- section7-kickstart-solc-0.8.9/ethereum/web3.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/section7-kickstart-solc-0.8.9/ethereum/factory.js b/section7-kickstart-solc-0.8.9/ethereum/factory.js index 55f8690..2a30ec8 100644 --- a/section7-kickstart-solc-0.8.9/ethereum/factory.js +++ b/section7-kickstart-solc-0.8.9/ethereum/factory.js @@ -1,8 +1,6 @@ import web3 from "./web3"; import CampaignFactory from "./build/CampaignFactory.json"; -require("dotenv").config(); - const instance = new web3.eth.Contract( CampaignFactory.abi, process.env.CAMPAIGN_FACTORY_ADDRESS, diff --git a/section7-kickstart-solc-0.8.9/ethereum/web3.js b/section7-kickstart-solc-0.8.9/ethereum/web3.js index 8a9c02c..f60d537 100644 --- a/section7-kickstart-solc-0.8.9/ethereum/web3.js +++ b/section7-kickstart-solc-0.8.9/ethereum/web3.js @@ -1,7 +1,5 @@ import Web3 from "web3"; -require("dotenv").config(); - let web3; if (typeof window !== "undefined" && typeof window.ethereum !== "undefined") {