diff options
author | Dan <danjm.com@gmail.com> | 2017-09-27 09:33:03 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-27 09:43:26 +0800 |
commit | 39365f2cc419ee824988e6dad4e8a75e650ad1cc (patch) | |
tree | bca98bc3776e91f54c08c47ae117be2bcb080b50 /ui/app/components | |
parent | 541b69dda9a5ddbb0ea4e4c0df805e886f53645c (diff) | |
download | tangerine-wallet-browser-39365f2cc419ee824988e6dad4e8a75e650ad1cc.tar.gz tangerine-wallet-browser-39365f2cc419ee824988e6dad4e8a75e650ad1cc.tar.zst tangerine-wallet-browser-39365f2cc419ee824988e6dad4e8a75e650ad1cc.zip |
Update the correct values in state when estimates are received.
Diffstat (limited to 'ui/app/components')
-rw-r--r-- | ui/app/components/send-token/index.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ui/app/components/send-token/index.js b/ui/app/components/send-token/index.js index 02423a348..8a827e951 100644 --- a/ui/app/components/send-token/index.js +++ b/ui/app/components/send-token/index.js @@ -93,8 +93,8 @@ SendTokenScreen.prototype.componentWillMount = function () { ]) .then(([blockGasPrice, estimatedGas]) => { this.setState({ - blockGasPrice, - estimatedGas, + gasPrice: blockGasPrice, + gasLimit: estimatedGas, }) }) } @@ -305,8 +305,6 @@ SendTokenScreen.prototype.renderGasInput = function () { isGasTooltipOpen, gasPrice, gasLimit, - blockGasPrice, - estimatedGas, selectedCurrency, errors: { gasPrice: gasPriceErrorMessage, @@ -327,8 +325,8 @@ SendTokenScreen.prototype.renderGasInput = function () { }, [ isGasTooltipOpen && h(GasTooltip, { className: 'send-tooltip', - gasPrice: gasPrice || blockGasPrice || '0x0', - gasLimit: gasLimit || estimatedGas || '0x0', + gasPrice: gasPrice || '0x0', + gasLimit: gasLimit || '0x0', onClose: () => this.setState({ isGasTooltipOpen: false }), onFeeChange: ({ gasLimit, gasPrice }) => { this.setState({ gasLimit, gasPrice, errors: {} }) @@ -351,9 +349,9 @@ SendTokenScreen.prototype.renderGasInput = function () { h(GasFeeDisplay, { conversionRate, tokenExchangeRate, - gasPrice: gasPrice || blockGasPrice || '0x0', + gasPrice: gasPrice || '0x0', activeCurrency: selectedCurrency, - gas: gasLimit || estimatedGas || '0x0', + gas: gasLimit || '0x0', blockGasLimit: currentBlockGasLimit, }), h( |