aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-05-01 00:37:01 +0800
committerDan <danjm.com@gmail.com>2018-05-01 00:37:01 +0800
commitbeb8d1cf5e2c15a57a72c85067f31c2e383ea08c (patch)
treebe6a412a3ab240c6e8ff0dec6d5357fcc8cfc982 /ui/app/components
parent4a8c3194c2a4742d448d9fa9240c56a1e3319601 (diff)
downloadtangerine-wallet-browser-beb8d1cf5e2c15a57a72c85067f31c2e383ea08c.tar.gz
tangerine-wallet-browser-beb8d1cf5e2c15a57a72c85067f31c2e383ea08c.tar.zst
tangerine-wallet-browser-beb8d1cf5e2c15a57a72c85067f31c2e383ea08c.zip
Move getMaxModeOn selector to amount-max-button container.
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.container.js2
-rw-r--r--ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js9
-rw-r--r--ui/app/components/send_/send-content/send-amount-row/send-amount-row.selectors.js5
3 files changed, 10 insertions, 6 deletions
diff --git a/ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.container.js b/ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.container.js
index b2ad1877a..a72f41775 100644
--- a/ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.container.js
+++ b/ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.container.js
@@ -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,
diff --git a/ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js b/ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js
new file mode 100644
index 000000000..69fec1994
--- /dev/null
+++ b/ui/app/components/send_/send-content/send-amount-row/amount-max-button/amount-max-button.selectors.js
@@ -0,0 +1,9 @@
+const selectors = {
+ getMaxModeOn,
+}
+
+module.exports = selectors
+
+function getMaxModeOn (state) {
+ return state.metamask.send.maxModeOn
+}
diff --git a/ui/app/components/send_/send-content/send-amount-row/send-amount-row.selectors.js b/ui/app/components/send_/send-content/send-amount-row/send-amount-row.selectors.js
index 62e4f6b32..fb08c7ed7 100644
--- a/ui/app/components/send_/send-content/send-amount-row/send-amount-row.selectors.js
+++ b/ui/app/components/send_/send-content/send-amount-row/send-amount-row.selectors.js
@@ -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)
}