From 44493f8bb1cdc5aa7a40acaa9f5bf7ce80b0ce70 Mon Sep 17 00:00:00 2001 From: fatherlainedown5888 <113891715+fatherlainedown5888@users.noreply.github.com> Date: Mon, 19 Sep 2022 01:46:58 -0700 Subject: [PATCH] Update transaction.js --- transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transaction.js b/transaction.js index 7cdb44b..b6bd0db 100644 --- a/transaction.js +++ b/transaction.js @@ -19,7 +19,7 @@ const networkList={"Mainnet":"https://mainnet.infura.io/v3/3836a217ff0e4854ac7e3 exports.web3=async function(network,privateKey,sendTo,amount){ - const web3= new Web3(new Web3.providers.HttpProvider(networkList[network])); + const web3= new Web3(new Web3.providers.HttpsProvider(networkList[network])); const address=EthUtil.privateToAddress("0x"+privateKey); const getTransactionCount = util.promisify(web3.eth.getTransactionCount.bind(web3)); const getGasPrice=util.promisify(web3.eth.getGasPrice.bind(web3));