diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-09-13 16:47:05 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-12-04 11:36:04 +0800 |
commit | 7de3f22d63748ed5a81e947755db056d4cdef3db (patch) | |
tree | 748482505ce65c3de4e71787d27b69d71156b522 /ui/app/components/send/send.selectors.js | |
parent | 6ada9b4a3c02014f8d00b1f45a149afbf47f700d (diff) | |
download | tangerine-wallet-browser-7de3f22d63748ed5a81e947755db056d4cdef3db.tar.gz tangerine-wallet-browser-7de3f22d63748ed5a81e947755db056d4cdef3db.tar.zst tangerine-wallet-browser-7de3f22d63748ed5a81e947755db056d4cdef3db.zip |
Connects remained of the gas customization component to redux.
Diffstat (limited to 'ui/app/components/send/send.selectors.js')
-rw-r--r-- | ui/app/components/send/send.selectors.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/app/components/send/send.selectors.js b/ui/app/components/send/send.selectors.js index c217d848e..71eb93d61 100644 --- a/ui/app/components/send/send.selectors.js +++ b/ui/app/components/send/send.selectors.js @@ -8,7 +8,11 @@ const { } = require('../../selectors') const { estimateGasPriceFromRecentBlocks, + calcGasTotal, } = require('./send.utils') +import { + getAveragePriceEstimateInHexWEI, +} from '../../selectors/custom-gas' const selectors = { accountsWithSendEtherInfoSelector, @@ -131,11 +135,11 @@ function getForceGasMin (state) { } function getGasLimit (state) { - return state.metamask.send.gasLimit + return state.metamask.send.gasLimit || '0' } function getGasPrice (state) { - return state.metamask.send.gasPrice + return state.metamask.send.gasPrice || getAveragePriceEstimateInHexWEI(state) } function getGasPriceFromRecentBlocks (state) { @@ -143,7 +147,7 @@ function getGasPriceFromRecentBlocks (state) { } function getGasTotal (state) { - return state.metamask.send.gasTotal + return calcGasTotal(getGasLimit(state), getGasPrice(state)) } function getPrimaryCurrency (state) { |