aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers/metamask.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-10-31 01:48:50 +0800
committerDan <danjm.com@gmail.com>2017-11-07 03:27:57 +0800
commit67bdfe87e31e695f8c4beab1659a3a4b764ccf24 (patch)
treebe7beef3beecccf6a4060b7f26e0d7ad5b0438b0 /ui/app/reducers/metamask.js
parent9f70762434deb1c973665a76623838289e655f22 (diff)
downloadtangerine-wallet-browser-67bdfe87e31e695f8c4beab1659a3a4b764ccf24.tar
tangerine-wallet-browser-67bdfe87e31e695f8c4beab1659a3a4b764ccf24.tar.gz
tangerine-wallet-browser-67bdfe87e31e695f8c4beab1659a3a4b764ccf24.tar.bz2
tangerine-wallet-browser-67bdfe87e31e695f8c4beab1659a3a4b764ccf24.tar.lz
tangerine-wallet-browser-67bdfe87e31e695f8c4beab1659a3a4b764ccf24.tar.xz
tangerine-wallet-browser-67bdfe87e31e695f8c4beab1659a3a4b764ccf24.tar.zst
tangerine-wallet-browser-67bdfe87e31e695f8c4beab1659a3a4b764ccf24.zip
Token balance in send state; validating sufficient tokens, validation updates on 'from' switching.
Diffstat (limited to 'ui/app/reducers/metamask.js')
-rw-r--r--ui/app/reducers/metamask.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index 50c9712ff..3b93a1625 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -27,6 +27,7 @@ function reduceMetamask (state, action) {
gasLimit: null,
gasPrice: null,
gasTotal: null,
+ tokenBalance: null,
from: '',
to: '',
amount: '0x0',
@@ -196,6 +197,14 @@ function reduceMetamask (state, action) {
},
})
+ case actions.UPDATE_SEND_TOKEN_BALANCE:
+ return extend(metamaskState, {
+ send: {
+ ...metamaskState.send,
+ tokenBalance: action.value,
+ },
+ })
+
case actions.UPDATE_SEND_FROM:
return extend(metamaskState, {
send: {