From 70132e6df6de0722113f5b461b4cec2419c45266 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 15 Feb 2018 15:15:07 -0800 Subject: Default validated block gas limit to 8MM when none identified Mitigates #3266 --- ui/app/components/pending-tx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index 32d54902e..eb6ece176 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -60,7 +60,7 @@ PendingTx.prototype.render = function () { // Gas const gas = txParams.gas const gasBn = hexToBn(gas) - const gasLimit = new BN(parseInt(blockGasLimit)) + const gasLimit = new BN(parseInt(blockGasLimit) || '8000000') // default to 8MM gas limit const safeGasLimitBN = this.bnMultiplyByFraction(gasLimit, 19, 20) const saferGasLimitBN = this.bnMultiplyByFraction(gasLimit, 18, 20) const safeGasLimit = safeGasLimitBN.toString(10) -- cgit v1.2.3 From 73e5ae6e29d04481cc3ffdd32d5d096e6a10b3b3 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 15 Feb 2018 15:32:48 -0800 Subject: Fix incorrect promise instantiation --- app/scripts/lib/nonce-tracker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/lib/nonce-tracker.js b/app/scripts/lib/nonce-tracker.js index 0029ac953..ed9dd3f11 100644 --- a/app/scripts/lib/nonce-tracker.js +++ b/app/scripts/lib/nonce-tracker.js @@ -56,7 +56,7 @@ class NonceTracker { const blockTracker = this._getBlockTracker() const currentBlock = blockTracker.getCurrentBlock() if (currentBlock) return currentBlock - return await Promise((reject, resolve) => { + return await new Promise((reject, resolve) => { blockTracker.once('latest', resolve) }) } -- cgit v1.2.3 From 8e80081966e6411fae41f398e063ac0a62fe415c Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 16 Feb 2018 07:50:51 -0800 Subject: lint - lift comment to new line --- ui/app/components/pending-tx.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index eb6ece176..98193ea6f 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -60,7 +60,8 @@ PendingTx.prototype.render = function () { // Gas const gas = txParams.gas const gasBn = hexToBn(gas) - const gasLimit = new BN(parseInt(blockGasLimit) || '8000000') // default to 8MM gas limit + // default to 8MM gas limit + const gasLimit = new BN(parseInt(blockGasLimit) || '8000000') const safeGasLimitBN = this.bnMultiplyByFraction(gasLimit, 19, 20) const saferGasLimitBN = this.bnMultiplyByFraction(gasLimit, 18, 20) const safeGasLimit = safeGasLimitBN.toString(10) -- cgit v1.2.3