aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/send.selectors.js
diff options
context:
space:
mode:
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) {