Move getMaxModeOn selector to amount-max-button container.

This commit is contained in:
Dan 2018-04-30 14:07:01 -02:30
parent 4a8c3194c2
commit beb8d1cf5e
3 changed files with 10 additions and 6 deletions

View File

@ -5,7 +5,7 @@ import {
getSendFromBalance,
getTokenBalance,
} from '../../../send.selectors.js'
import { getMaxModeOn } from '../send-amount-row.selectors.js'
import { getMaxModeOn } from './amount-max-button.selectors.js'
import { calcMaxAmount } from './amount-max-button.utils.js'
import {
updateSendAmount,

View File

@ -0,0 +1,9 @@
const selectors = {
getMaxModeOn,
}
module.exports = selectors
function getMaxModeOn (state) {
return state.metamask.send.maxModeOn
}

View File

@ -1,14 +1,9 @@
const selectors = {
getMaxModeOn,
sendAmountIsInError,
}
module.exports = selectors
function getMaxModeOn (state) {
return state.metamask.send.maxModeOn
}
function sendAmountIsInError (state) {
return Boolean(state.send.errors.amount)
}