Socket
Socket
Sign inDemoInstall

web3-provider-engine

Package Overview
Dependencies
Maintainers
1
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-provider-engine - npm Package Compare versions

Comparing version 7.6.3 to 7.6.4

util/estimate-gas.js

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc