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
feature/default_network_editable
Dan Finlay 6 years ago committed by Whymarrh Whitby
parent b2939e8627
commit c49d854b55
  1. 2
      app/scripts/metamask-controller.js
  2. 2
      test/unit/app/controllers/metamask-controller-test.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)
}

@ -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
})

Loading…
Cancel
Save