mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01: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:
parent
b2939e8627
commit
c49d854b55
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user