diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-02-16 23:57:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 23:57:31 +0800 |
commit | b046378e335f23b7c2447c2ad40fe4d8ab2da67a (patch) | |
tree | e5918655060dd273e5d7cbea86e4425ae7d2d4a9 | |
parent | a26add6fdfbaa74f1d357e42aa9a260b68d14bed (diff) | |
parent | 8e80081966e6411fae41f398e063ac0a62fe415c (diff) | |
download | tangerine-wallet-browser-b046378e335f23b7c2447c2ad40fe4d8ab2da67a.tar tangerine-wallet-browser-b046378e335f23b7c2447c2ad40fe4d8ab2da67a.tar.gz tangerine-wallet-browser-b046378e335f23b7c2447c2ad40fe4d8ab2da67a.tar.bz2 tangerine-wallet-browser-b046378e335f23b7c2447c2ad40fe4d8ab2da67a.tar.lz tangerine-wallet-browser-b046378e335f23b7c2447c2ad40fe4d8ab2da67a.tar.xz tangerine-wallet-browser-b046378e335f23b7c2447c2ad40fe4d8ab2da67a.tar.zst tangerine-wallet-browser-b046378e335f23b7c2447c2ad40fe4d8ab2da67a.zip |
Merge pull request #3267 from MetaMask/i3266-IgnoreZeroGasLimit
Default validated block gas limit to 8MM when none identified
-rw-r--r-- | app/scripts/lib/nonce-tracker.js | 2 | ||||
-rw-r--r-- | ui/app/components/pending-tx.js | 3 |
2 files changed, 3 insertions, 2 deletions
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) }) } diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index 32d54902e..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)) + // 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) |