aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-04-30 06:53:29 +0800
committerDan Finlay <dan@danfinlay.com>2016-04-30 08:02:36 +0800
commit988165224b41c1eb3fe1b639b5801204936000e1 (patch)
tree2ee46ca24e9aa6ee399a45192ed0a46c59dd6a13 /ui/app
parent8421c97db21af0bc616fa6c0671f6f1a3b60b815 (diff)
downloadtangerine-wallet-browser-988165224b41c1eb3fe1b639b5801204936000e1.tar
tangerine-wallet-browser-988165224b41c1eb3fe1b639b5801204936000e1.tar.gz
tangerine-wallet-browser-988165224b41c1eb3fe1b639b5801204936000e1.tar.bz2
tangerine-wallet-browser-988165224b41c1eb3fe1b639b5801204936000e1.tar.lz
tangerine-wallet-browser-988165224b41c1eb3fe1b639b5801204936000e1.tar.xz
tangerine-wallet-browser-988165224b41c1eb3fe1b639b5801204936000e1.tar.zst
tangerine-wallet-browser-988165224b41c1eb3fe1b639b5801204936000e1.zip
Fix outdated transitions
Fixes #151 - Cancelling or completing a tx now goes back to account detail view. - Restoring a vault now does not select an unloaded account, shows account list. - Account list now never selects an item only uses the cells as buttons.
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/accounts.js2
-rw-r--r--ui/app/actions.js18
-rw-r--r--ui/app/reducers/app.js7
3 files changed, 10 insertions, 17 deletions
diff --git a/ui/app/accounts.js b/ui/app/accounts.js
index d35e80678..0cc72878c 100644
--- a/ui/app/accounts.js
+++ b/ui/app/accounts.js
@@ -91,7 +91,7 @@ AccountsScreen.prototype.render = function() {
var componentState = extend(actions, {
identity: identity,
account: account,
- isSelected: isSelected,
+ isSelected: false,
isFauceting: isFauceting,
})
return h(AccountPanel, componentState)
diff --git a/ui/app/actions.js b/ui/app/actions.js
index a2106ea85..12e20e0cf 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -131,15 +131,11 @@ function recoverFromSeed(password, seed) {
// dispatch(this.createNewVaultInProgress())
dispatch(this.showLoadingIndication())
_accountManager.recoverFromSeed(password, seed, (err, selectedAccount) => {
- if (err) {
- dispatch(this.hideLoadingIndication())
- var message = err.message
- return dispatch(this.displayWarning(err.message))
- }
+ dispatch(this.hideLoadingIndication())
+ if (err) return dispatch(this.displayWarning(err.message))
dispatch(this.unlockMetamask())
- dispatch(this.showAccountDetail(selectedAccount))
- dispatch(this.hideLoadingIndication())
+ dispatch(this.showAccountsPage())
})
}
}
@@ -165,7 +161,7 @@ function signTx(txData) {
if (err) return dispatch(this.displayWarning(err.message))
dispatch(this.hideWarning())
- dispatch(this.showAccountsPage())
+ dispatch(this.goHome())
})
}
}
@@ -198,10 +194,8 @@ function txError(err) {
}
function cancelTx(txData){
- return (dispatch) => {
- _accountManager.cancelTransaction(txData.id)
- dispatch(this.showAccountsPage())
- }
+ _accountManager.cancelTransaction(txData.id)
+ return this.goHome()
}
//
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 143a67527..57cdccbac 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -199,12 +199,11 @@ function reduceApp(state, action) {
} else {
return extend(appState, {
transForward: false,
+ warning: null,
currentView: {
- name: 'accounts',
- context: 0,
+ name: 'accountDetail',
+ context: appState.currentView.context,
},
- transForward: false,
- warning: null,
})
}