1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

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
This commit is contained in:
Dan Finlay 2018-10-04 14:08:05 -07:00 committed by Whymarrh Whitby
parent b2939e8627
commit c49d854b55
2 changed files with 2 additions and 2 deletions

View File

@ -1363,7 +1363,7 @@ module.exports = class MetamaskController extends EventEmitter {
}) })
.map(number => number.div(GWEI_BN).toNumber()) .map(number => number.div(GWEI_BN).toNumber())
const percentileNum = percentile(50, lowestPrices) const percentileNum = percentile(65, lowestPrices)
const percentileNumBn = new BN(percentileNum) const percentileNumBn = new BN(percentileNum)
return '0x' + percentileNumBn.mul(GWEI_BN).toString(16) return '0x' + percentileNumBn.mul(GWEI_BN).toString(16)
} }

View File

@ -116,7 +116,7 @@ describe('MetaMaskController', function () {
} }
const gasPrice = metamaskController.getGasPrice() 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 metamaskController.recentBlocksController = realRecentBlocksController
}) })