From 2fc56c8d63fd16140edf2707de7ee937ed1a32aa Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 6 Aug 2019 17:42:18 -0400 Subject: [PATCH] re-add gas price check --- .../src/lib/modules/ethereum-blockchain-client/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/embark/src/lib/modules/ethereum-blockchain-client/index.js b/packages/embark/src/lib/modules/ethereum-blockchain-client/index.js index dc499c95a..6d59df2c3 100644 --- a/packages/embark/src/lib/modules/ethereum-blockchain-client/index.js +++ b/packages/embark/src/lib/modules/ethereum-blockchain-client/index.js @@ -38,6 +38,11 @@ class EthereumBlockchainClient { contract.gas = Math.floor(gasValue * increase_per); } + if (!contract.gasPrice) { + let gasPrice = await web3.eth.getGasPrice() + contract.gasPrice = contract.gasPrice || gasPrice; + } + // this.blockchain.deployContractFromObject(deployObject, console.dir({ arguments: contract.args, data: ("0x" + contract.code) }); console.dir("------- send")