aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers/app.js
diff options
context:
space:
mode:
authorPhyrexTsai <x01ep23i@hotmail.com>2018-06-01 15:41:18 +0800
committerGitHub <noreply@github.com>2018-06-01 15:41:18 +0800
commitf90d07019081695ef3d697c5af0ae2bee3bb1637 (patch)
treef7c68bb9bcaaddc035c6595bb78fcba98d6cfd1c /ui/app/reducers/app.js
parentcc5bdadbf1f12f3f8d7f24f9bcf7ea81fe93f012 (diff)
parentcc73d869fed79c63261821fb7ad8f1e5180ffca2 (diff)
downloadtangerine-wallet-browser-f90d07019081695ef3d697c5af0ae2bee3bb1637.tar.gz
tangerine-wallet-browser-f90d07019081695ef3d697c5af0ae2bee3bb1637.tar.zst
tangerine-wallet-browser-f90d07019081695ef3d697c5af0ae2bee3bb1637.zip
Merge branch 'develop' into portal-metamask
Diffstat (limited to 'ui/app/reducers/app.js')
-rw-r--r--ui/app/reducers/app.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 2b39eb8db..4e9d0848c 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -42,6 +42,7 @@ function reduceApp (state, action) {
open: false,
modalState: {
name: null,
+ props: {},
},
previousModalState: {
name: null,
@@ -88,13 +89,17 @@ function reduceApp (state, action) {
// modal methods:
case actions.MODAL_OPEN:
+ const { name, ...modalProps } = action.payload
+
return extend(appState, {
- modal: Object.assign(
- state.appState.modal,
- { open: true },
- { modalState: action.payload },
- { previousModalState: appState.modal.modalState},
- ),
+ modal: {
+ open: true,
+ modalState: {
+ name: name,
+ props: { ...modalProps },
+ },
+ previousModalState: { ...appState.modal.modalState },
+ },
})
case actions.MODAL_CLOSE:
@@ -102,7 +107,7 @@ function reduceApp (state, action) {
modal: Object.assign(
state.appState.modal,
{ open: false },
- { modalState: { name: null } },
+ { modalState: { name: null, props: {} } },
{ previousModalState: appState.modal.modalState},
),
})