1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Default to estimating 1 gwei for empty blocks.

To avoid estimating 0 gwei on low-traffic private networks.
This commit is contained in:
Dan Finlay 2018-01-08 14:58:38 -08:00 committed by GitHub
parent f441bb7248
commit 34826d18aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -492,7 +492,7 @@ module.exports = class MetamaskController extends EventEmitter {
const { recentBlocks } = recentBlocksController.store.getState()
const lowestPrices = recentBlocks.map((block) => {
if (!block.gasPrices) {
return new BN(0)
return GWEI_BN
}
return block.gasPrices
.map(hexPrefix => hexPrefix.substr(2))