aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-06-29 08:10:06 +0800
committerDan <danjm.com@gmail.com>2018-07-04 03:54:21 +0800
commit7babacf062cd77235ecfba3ca352a65f3a702728 (patch)
tree6408f112112c070fd9964ad689b0e29aaee035a6 /ui
parentde01a6f112716cad8ebc1fd56dd304f1818704f4 (diff)
downloadtangerine-wallet-browser-7babacf062cd77235ecfba3ca352a65f3a702728.tar
tangerine-wallet-browser-7babacf062cd77235ecfba3ca352a65f3a702728.tar.gz
tangerine-wallet-browser-7babacf062cd77235ecfba3ca352a65f3a702728.tar.bz2
tangerine-wallet-browser-7babacf062cd77235ecfba3ca352a65f3a702728.tar.lz
tangerine-wallet-browser-7babacf062cd77235ecfba3ca352a65f3a702728.tar.xz
tangerine-wallet-browser-7babacf062cd77235ecfba3ca352a65f3a702728.tar.zst
tangerine-wallet-browser-7babacf062cd77235ecfba3ca352a65f3a702728.zip
Remove unnecessary anonymous function call in actions.js gas estimation.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/actions.js13
1 files changed, 6 insertions, 7 deletions
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({