aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers/app.js
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-08-21 06:35:38 +0800
committerEsteban MIno <efmino@uc.cl>2018-08-21 06:35:38 +0800
commit81cd29df43feb2469b78c6240d12ffcb9a68678e (patch)
tree15b14d9d3a29e5c21776ce5f9a3b35c7934abb81 /ui/app/reducers/app.js
parentdbab9a007fc9663427cebdbe1d41c51df67fd1fe (diff)
parent887cad973f25f43d2d4502ff31657f156a44b188 (diff)
downloadtangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.gz
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.bz2
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.lz
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.xz
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.zst
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.zip
Merge branch 'develop' into WatchTokenFeature
Diffstat (limited to 'ui/app/reducers/app.js')
-rw-r--r--ui/app/reducers/app.js29
1 files changed, 28 insertions, 1 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index f76b73132..7be9b8d40 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: {
@@ -65,6 +66,11 @@ function reduceApp (state, action) {
buyView: {},
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) {
@@ -90,7 +96,7 @@ function reduceApp (state, action) {
sidebarOpen: false,
})
- // sidebar methods
+ // alert methods
case actions.ALERT_OPEN:
return extend(appState, {
alertOpen: true,
@@ -103,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
@@ -525,6 +538,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,
@@ -710,6 +732,11 @@ function reduceApp (state, action) {
gasIsLoading: false,
})
+ case actions.SET_NETWORK_NONCE:
+ return extend(appState, {
+ networkNonce: action.value,
+ })
+
default:
return appState
}