From 0f20fce9b761fc0aa16d61b2b739fa7f9b9f6a7d Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 23 May 2018 14:13:25 -0230 Subject: Auto update gas estimate when to changes. --- ui/app/actions.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ui/app/actions.js') diff --git a/ui/app/actions.js b/ui/app/actions.js index 7a18b1c00..5e92583e0 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -731,16 +731,21 @@ function updateGasData ({ selectedAddress, selectedToken, to, + value, }) { + const estimatedGasPrice = estimateGasPriceFromRecentBlocks(recentBlocks) return (dispatch) => { return Promise.all([ - Promise.resolve(estimateGasPriceFromRecentBlocks(recentBlocks)), + Promise.resolve(estimatedGasPrice), estimateGas({ + estimateGasMethod: background.estimateGas, blockGasLimit, data, selectedAddress, selectedToken, to, + value, + gasPrice: estimatedGasPrice, }), ]) .then(([gasPrice, gas]) => { -- cgit