From 2b7d8424981fbbd0f6306b5ee7abf8754f9f7092 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Fri, 2 Jun 2017 15:18:14 -0700 Subject: Update gasblocklimit params with every block. --- app/scripts/lib/eth-store.js | 2 ++ app/scripts/lib/tx-utils.js | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'app') diff --git a/app/scripts/lib/eth-store.js b/app/scripts/lib/eth-store.js index 6f04a9dd6..ebba98f5c 100644 --- a/app/scripts/lib/eth-store.js +++ b/app/scripts/lib/eth-store.js @@ -21,6 +21,7 @@ class EthereumStore extends ObservableStore { transactions: {}, currentBlockNumber: '0', currentBlockHash: '', + currentBlockGasLimit: '', }) this._provider = opts.provider this._query = new EthQuery(this._provider) @@ -73,6 +74,7 @@ class EthereumStore extends ObservableStore { this._currentBlockNumber = blockNumber this.updateState({ currentBlockNumber: parseInt(blockNumber) }) this.updateState({ currentBlockHash: `0x${block.hash.toString('hex')}`}) + this.updateState({ currentBlockGasLimit: `0x${block.gasLimit.toString('hex')}` }) async.parallel([ this._updateAccounts.bind(this), this._updateTransactions.bind(this, blockNumber), diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js index 658f3bedc..149d93102 100644 --- a/app/scripts/lib/tx-utils.js +++ b/app/scripts/lib/tx-utils.js @@ -21,21 +21,12 @@ module.exports = class txProviderUtils { this.query.getBlockByNumber('latest', true, (err, block) => { if (err) return cb(err) async.waterfall([ - self.setBlockGasLimit.bind(self, txMeta, block.gasLimit), self.estimateTxGas.bind(self, txMeta, block.gasLimit), self.setTxGas.bind(self, txMeta, block.gasLimit), ], cb) }) } - setBlockGasLimit (txMeta, blockGasLimitHex, cb) { - const blockGasLimitBN = hexToBn(blockGasLimitHex) - const saferGasLimitBN = BnMultiplyByFraction(blockGasLimitBN, 19, 20) - txMeta.blockGasLimit = bnToHex(saferGasLimitBN) - cb() - return - } - estimateTxGas (txMeta, blockGasLimitHex, cb) { const txParams = txMeta.txParams // check if gasLimit is already specified -- cgit From 017c7c4c006d3e6041d33ae815d83faf43ec21bb Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 8 Jun 2017 16:42:00 -0700 Subject: 3.7.7 --- app/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/manifest.json b/app/manifest.json index 2d321e862..a0d1500c2 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "MetaMask", "short_name": "Metamask", - "version": "3.7.6", + "version": "3.7.7", "manifest_version": 2, "author": "https://metamask.io", "description": "Ethereum Browser Extension", -- cgit