aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/reducers/app.js')
-rw-r--r--ui/app/reducers/app.js23
1 files changed, 22 insertions, 1 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index e4e4c8581..c246e7904 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -51,6 +51,7 @@ function reduceApp (state, action) {
sidebarOpen: false,
alertOpen: false,
alertMessage: null,
+ qrCodeData: null,
networkDropdownOpen: false,
currentView: seedWords ? seedConfView : defaultView,
accountDetail: {
@@ -66,6 +67,10 @@ function reduceApp (state, action) {
isMouseUser: false,
gasIsLoading: false,
networkNonce: null,
+ defaultHdPaths: {
+ trezor: `m/44'/60'/0'/0`,
+ ledger: `m/44'/60'/0'/0/0`,
+ },
}, state.appState)
switch (action.type) {
@@ -91,7 +96,7 @@ function reduceApp (state, action) {
sidebarOpen: false,
})
- // sidebar methods
+ // alert methods
case actions.ALERT_OPEN:
return extend(appState, {
alertOpen: true,
@@ -104,6 +109,13 @@ function reduceApp (state, action) {
alertMessage: null,
})
+ // qr scanner methods
+ case actions.QR_CODE_DETECTED:
+ return extend(appState, {
+ qrCodeData: action.value,
+ })
+
+
// modal methods:
case actions.MODAL_OPEN:
const { name, ...modalProps } = action.payload
@@ -517,6 +529,15 @@ function reduceApp (state, action) {
warning: '',
})
+ case actions.SET_HARDWARE_WALLET_DEFAULT_HD_PATH:
+ const { device, path } = action.value
+ const newDefaults = {...appState.defaultHdPaths}
+ newDefaults[device] = path
+
+ return extend(appState, {
+ defaultHdPaths: newDefaults,
+ })
+
case actions.SHOW_LOADING:
return extend(appState, {
isLoading: true,