From add1cbd884042896e32527174e8259881201cb9c Mon Sep 17 00:00:00 2001 From: Mathieu <85969303+Mathieu-Be@users.noreply.github.com> Date: Thu, 20 Jan 2022 16:33:49 +0100 Subject: [PATCH] Current network gas price in the menu bar (#692) --- main/windows/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/windows/index.js b/main/windows/index.js index 4550a9702..ee509cacf 100644 --- a/main/windows/index.js +++ b/main/windows/index.js @@ -201,7 +201,8 @@ const api = { this.gasObserver = store.observer(() => { let title = '' if (store('platform') === 'darwin' && store('main.menubarGasPrice')) { - const gasPrice = store('main.networksMeta.ethereum.1.gas.price.levels.fast') + const currentNetwork = store('main.currentNetwork'); + const gasPrice = store('main.networksMeta.ethereum.' + currentNetwork.id + '.gas.price.levels.fast') if (!gasPrice) return const gasDisplay = Math.round(parseInt(gasPrice, 'hex') / 1000000000).toString() title = gasDisplay // ɢ 🄶 Ⓖ ᴳᵂᴱᴵ