aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/send.selectors.js
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2018-12-05 00:32:08 +0800
committerGitHub <noreply@github.com>2018-12-05 00:32:08 +0800
commitd1996509deccd98d7ffa4cc360dc96c5392879d3 (patch)
treec8d9dbf1a3b393573f51af2563cdc3f589b1a162 /ui/app/components/send/send.selectors.js
parent35670e926116b19e66931dace838d785adffac09 (diff)
parent8194309a9a7319bcebd6761a4596c208375adfab (diff)
downloadtangerine-wallet-browser-d1996509deccd98d7ffa4cc360dc96c5392879d3.tar.gz
tangerine-wallet-browser-d1996509deccd98d7ffa4cc360dc96c5392879d3.tar.zst
tangerine-wallet-browser-d1996509deccd98d7ffa4cc360dc96c5392879d3.zip
Merge pull request #5704 from MetaMask/new-gas-customize-feature-branch-d
Gas customization features
Diffstat (limited to 'ui/app/components/send/send.selectors.js')
-rw-r--r--ui/app/components/send/send.selectors.js10
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..443c82af5 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 {
+ getFastPriceEstimateInHexWEI,
+} 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 || getFastPriceEstimateInHexWEI(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) {