diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-10-05 05:08:05 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-10-05 05:08:05 +0800 |
commit | c49d854b55b3efd34c7fd0414b76f7feaa2eec7c (patch) | |
tree | 92f7a7a9db9459e17aaaac1c912c5b4842b7cb63 | |
parent | b2939e86277a548ea05c83147ca913b8bcf0be65 (diff) | |
download | tangerine-wallet-browser-c49d854b55b3efd34c7fd0414b76f7feaa2eec7c.tar tangerine-wallet-browser-c49d854b55b3efd34c7fd0414b76f7feaa2eec7c.tar.gz tangerine-wallet-browser-c49d854b55b3efd34c7fd0414b76f7feaa2eec7c.tar.bz2 tangerine-wallet-browser-c49d854b55b3efd34c7fd0414b76f7feaa2eec7c.tar.lz tangerine-wallet-browser-c49d854b55b3efd34c7fd0414b76f7feaa2eec7c.tar.xz tangerine-wallet-browser-c49d854b55b3efd34c7fd0414b76f7feaa2eec7c.tar.zst tangerine-wallet-browser-c49d854b55b3efd34c7fd0414b76f7feaa2eec7c.zip |
Increase suggested gas percentile to 65 (#5359)
* Increase suggested gas percentile to 65
I keep submitting transactions then waiting a long time. Apparently 50th percentile isn't enough.
* Update test for getGasPrice
-rw-r--r-- | app/scripts/metamask-controller.js | 2 | ||||
-rw-r--r-- | test/unit/app/controllers/metamask-controller-test.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 34ca80dd7..78dc57972 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -1363,7 +1363,7 @@ module.exports = class MetamaskController extends EventEmitter { }) .map(number => number.div(GWEI_BN).toNumber()) - const percentileNum = percentile(50, lowestPrices) + const percentileNum = percentile(65, lowestPrices) const percentileNumBn = new BN(percentileNum) return '0x' + percentileNumBn.mul(GWEI_BN).toString(16) } diff --git a/test/unit/app/controllers/metamask-controller-test.js b/test/unit/app/controllers/metamask-controller-test.js index e7a28bedb..17be2c028 100644 --- a/test/unit/app/controllers/metamask-controller-test.js +++ b/test/unit/app/controllers/metamask-controller-test.js @@ -116,7 +116,7 @@ describe('MetaMaskController', function () { } const gasPrice = metamaskController.getGasPrice() - assert.equal(gasPrice, '0x3b9aca00', 'accurately estimates 50th percentile accepted gas price') + assert.equal(gasPrice, '0x174876e800', 'accurately estimates 65th percentile accepted gas price') metamaskController.recentBlocksController = realRecentBlocksController }) |