aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers/app.js
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-08-04 02:56:02 +0800
committerEsteban MIno <efmino@uc.cl>2018-08-04 02:56:02 +0800
commit21a61f2987ae83a48bb1f7256ec9c34978413eb2 (patch)
tree3bc9ef3d342f17269942cd3fe58da1f3b97ef214 /ui/app/reducers/app.js
parent0481335dda447ba4c228d146834952bac0ad641b (diff)
parentfa4423bab2886017996955f809b6e3102cbf1781 (diff)
downloadtangerine-wallet-browser-21a61f2987ae83a48bb1f7256ec9c34978413eb2.tar.gz
tangerine-wallet-browser-21a61f2987ae83a48bb1f7256ec9c34978413eb2.tar.zst
tangerine-wallet-browser-21a61f2987ae83a48bb1f7256ec9c34978413eb2.zip
merge develop
Diffstat (limited to 'ui/app/reducers/app.js')
-rw-r--r--ui/app/reducers/app.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 4e9d0848c..50d8bcba7 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -49,6 +49,8 @@ function reduceApp (state, action) {
},
},
sidebarOpen: false,
+ alertOpen: false,
+ alertMessage: null,
networkDropdownOpen: false,
currentView: seedWords ? seedConfView : defaultView,
accountDetail: {
@@ -62,6 +64,7 @@ function reduceApp (state, action) {
warning: null,
buyView: {},
isMouseUser: false,
+ gasIsLoading: false,
}, state.appState)
switch (action.type) {
@@ -87,6 +90,19 @@ function reduceApp (state, action) {
sidebarOpen: false,
})
+ // sidebar methods
+ case actions.ALERT_OPEN:
+ return extend(appState, {
+ alertOpen: true,
+ alertMessage: action.value,
+ })
+
+ case actions.ALERT_CLOSE:
+ return extend(appState, {
+ alertOpen: false,
+ alertMessage: null,
+ })
+
// modal methods:
case actions.MODAL_OPEN:
const { name, ...modalProps } = action.payload
@@ -675,6 +691,16 @@ function reduceApp (state, action) {
isMouseUser: action.value,
})
+ case actions.GAS_LOADING_STARTED:
+ return extend(appState, {
+ gasIsLoading: true,
+ })
+
+ case actions.GAS_LOADING_FINISHED:
+ return extend(appState, {
+ gasIsLoading: false,
+ })
+
default:
return appState
}