From 7babacf062cd77235ecfba3ca352a65f3a702728 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 28 Jun 2018 21:40:06 -0230 Subject: Remove unnecessary anonymous function call in actions.js gas estimation. --- ui/app/actions.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index f118251eb..408bc700b 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -6,7 +6,6 @@ const { calcGasTotal, calcTokenBalance, estimateGas, - estimateGasPriceFromRecentBlocks, } = require('./components/send_/send.utils') const ethUtil = require('ethereumjs-util') const { fetchLocale } = require('../i18n-helper') @@ -747,12 +746,12 @@ function updateGasData ({ return (dispatch) => { dispatch(actions.gasLoadingStarted()) let gasPrice - return (() => new Promise((resolve, reject) => { - background.getGasPrice((err, data) => { - if(err !== null) return reject(err); - return resolve(data); - }) - }))() + return new Promise((resolve, reject) => { + background.getGasPrice((err, data) => { + if (err !== null) return reject(err) + return resolve(data) + }) + }) .then(estimateGasPrice => { gasPrice = estimateGasPrice return estimateGas({ -- cgit v1.2.3