aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/ducks/send.duck.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-05-14 20:57:36 +0800
committerDan <danjm.com@gmail.com>2018-05-14 20:57:36 +0800
commit0739618a61cfc383498e466f4fdeb5a25324598f (patch)
treeb386cdfc09134ed5b865af2f785f3474551c2ccb /ui/app/ducks/send.duck.js
parent0076b732bd7c7d22b947f8d437c91944dac78219 (diff)
downloadtangerine-wallet-browser-0739618a61cfc383498e466f4fdeb5a25324598f.tar
tangerine-wallet-browser-0739618a61cfc383498e466f4fdeb5a25324598f.tar.gz
tangerine-wallet-browser-0739618a61cfc383498e466f4fdeb5a25324598f.tar.bz2
tangerine-wallet-browser-0739618a61cfc383498e466f4fdeb5a25324598f.tar.lz
tangerine-wallet-browser-0739618a61cfc383498e466f4fdeb5a25324598f.tar.xz
tangerine-wallet-browser-0739618a61cfc383498e466f4fdeb5a25324598f.tar.zst
tangerine-wallet-browser-0739618a61cfc383498e466f4fdeb5a25324598f.zip
Tests for send.duck.js
Diffstat (limited to 'ui/app/ducks/send.duck.js')
-rw-r--r--ui/app/ducks/send.duck.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/ui/app/ducks/send.duck.js b/ui/app/ducks/send.duck.js
index aef493ea0..055cc05c1 100644
--- a/ui/app/ducks/send.duck.js
+++ b/ui/app/ducks/send.duck.js
@@ -16,32 +16,34 @@ const initState = {
// Reducer
export default function reducer ({ send: sendState = initState }, action = {}) {
+ const newState = extend({}, sendState)
+
switch (action.type) {
case OPEN_FROM_DROPDOWN:
- return extend(sendState, {
+ return extend(newState, {
fromDropdownOpen: true,
})
case CLOSE_FROM_DROPDOWN:
- return extend(sendState, {
+ return extend(newState, {
fromDropdownOpen: false,
})
case OPEN_TO_DROPDOWN:
- return extend(sendState, {
+ return extend(newState, {
toDropdownOpen: true,
})
case CLOSE_TO_DROPDOWN:
- return extend(sendState, {
+ return extend(newState, {
toDropdownOpen: false,
})
case UPDATE_SEND_ERRORS:
- return extend(sendState, {
+ return extend(newState, {
errors: {
- ...sendState.errors,
+ ...newState.errors,
...action.value,
},
})
default:
- return sendState
+ return newState
}
}