From 34826d18aa0acbe06d5c27013f249fa7c664d072 Mon Sep 17 00:00:00 2001 From: Dan Finlay <542863+danfinlay@users.noreply.github.com> Date: Mon, 8 Jan 2018 14:58:38 -0800 Subject: [PATCH] Default to estimating 1 gwei for empty blocks. To avoid estimating 0 gwei on low-traffic private networks. --- app/scripts/metamask-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 66738db51..aa2dddf3d 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -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))