diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 6f4d4c941..e9db53a8d 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -1886,7 +1886,7 @@ module.exports = class MetamaskController extends EventEmitter { resolve(gasPrice) } } else if (isRSK) { - gasPrice = this.getGasPriceFromLastBlockRSK(networkId) + gasPrice = this.getGasPriceFromLastBlockRSK() resolve(gasPrice) } else { gasPrice = this.getGasPriceFromBlocks(networkId) @@ -1937,7 +1937,7 @@ module.exports = class MetamaskController extends EventEmitter { * Related issue: https://github.com/poanetwork/nifty-wallet/issues/301 * @returns {string} A hex representation of the suggested wei gas price. */ - getGasPriceFromLastBlockRSK (networkId) { + getGasPriceFromLastBlockRSK () { const { recentBlocksController } = this const { recentBlocks } = recentBlocksController.store.getState() @@ -1946,10 +1946,8 @@ module.exports = class MetamaskController extends EventEmitter { const gasPrice = recentBlock && recentBlock.minimumGasPrice - const gasPriceInt = parseInt(gasPrice, 10) - - if (gasPriceInt !== 0) { - return '0x' + gasPriceInt.toString(16) + if (gasPrice !== 0) { + return gasPrice } else { return '0x' + GWEI_BN.toString(16) }