|
|
@ -6,7 +6,6 @@ const { |
|
|
|
calcGasTotal, |
|
|
|
calcGasTotal, |
|
|
|
calcTokenBalance, |
|
|
|
calcTokenBalance, |
|
|
|
estimateGas, |
|
|
|
estimateGas, |
|
|
|
estimateGasPriceFromRecentBlocks, |
|
|
|
|
|
|
|
} = require('./components/send_/send.utils') |
|
|
|
} = require('./components/send_/send.utils') |
|
|
|
const ethUtil = require('ethereumjs-util') |
|
|
|
const ethUtil = require('ethereumjs-util') |
|
|
|
const { fetchLocale } = require('../i18n-helper') |
|
|
|
const { fetchLocale } = require('../i18n-helper') |
|
|
@ -747,12 +746,12 @@ function updateGasData ({ |
|
|
|
return (dispatch) => { |
|
|
|
return (dispatch) => { |
|
|
|
dispatch(actions.gasLoadingStarted()) |
|
|
|
dispatch(actions.gasLoadingStarted()) |
|
|
|
let gasPrice |
|
|
|
let gasPrice |
|
|
|
return (() => new Promise((resolve, reject) => { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
background.getGasPrice((err, data) => { |
|
|
|
background.getGasPrice((err, data) => { |
|
|
|
if(err !== null) return reject(err); |
|
|
|
if (err !== null) return reject(err) |
|
|
|
return resolve(data); |
|
|
|
return resolve(data) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}))() |
|
|
|
}) |
|
|
|
.then(estimateGasPrice => { |
|
|
|
.then(estimateGasPrice => { |
|
|
|
gasPrice = estimateGasPrice |
|
|
|
gasPrice = estimateGasPrice |
|
|
|
return estimateGas({ |
|
|
|
return estimateGas({ |
|
|
|