Move getMaxModeOn selector to amount-max-button container.

feature/default_network_editable
Dan 7 years ago
parent 4a8c3194c2
commit beb8d1cf5e
  1. 2
      ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.container.js
  2. 9
      ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js
  3. 5
      ui/app/components/send_/send-content/send-amount-row/send-amount-row.selectors.js

@ -5,7 +5,7 @@ import {
getSendFromBalance, getSendFromBalance,
getTokenBalance, getTokenBalance,
} from '../../../send.selectors.js' } 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 { calcMaxAmount } from './amount-max-button.utils.js'
import { import {
updateSendAmount, updateSendAmount,

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

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

Loading…
Cancel
Save