web3-provider-engine
Advanced tools
Comparing version 7.6.3 to 7.6.4
{ | ||
"name": "web3-provider-engine", | ||
"version": "7.6.3", | ||
"version": "7.6.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,2 +13,3 @@ /* | ||
const Subprovider = require('./subprovider.js') | ||
const estimateGas = require('../util/estimate-gas.js') | ||
@@ -154,3 +155,3 @@ module.exports = HookedWalletSubprovider | ||
// console.log("need to get gas") | ||
reqs.gas = self.emitPayload.bind(self, { method: 'eth_estimateGas', params: [ txParams, 'pending'] }) | ||
reqs.gas = estimateGas.bind(null, self.engine, { method: 'eth_estimateGas', params: [txParams] }) | ||
} | ||
@@ -162,11 +163,6 @@ | ||
var res = { } | ||
if (result.gasPrice) | ||
res.gasPrice = result.gasPrice.result | ||
if (result.nonce) | ||
res.nonce = result.nonce.result | ||
if (result.gas) | ||
// add some extra gas, just in case | ||
// see https://github.com/MetaMask/metamask-plugin/issues/60 | ||
res.gas = Math.ceil(1.5 * parseInt(result.gas.result, 16)) | ||
var res = {} | ||
if (result.gasPrice) res.gasPrice = result.gasPrice.result | ||
if (result.nonce) res.nonce = result.nonce.result | ||
if (result.gas) res.gas = result.gas | ||
@@ -173,0 +169,0 @@ cb(null, extend(res, txParams)) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1631779
43
39561