aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-08-17 08:06:21 +0800
committerDan Finlay <dan@danfinlay.com>2017-08-17 08:06:21 +0800
commit343a7e9cce051d3045fe1a0c8a408c0d7402a1a1 (patch)
tree47c8a17f58f4e6add3ddd4cb890d02e5f8fe5f06 /ui/app
parent27d030b1a13d3b23ee0e948661867e1754e5796d (diff)
downloadtangerine-wallet-browser-343a7e9cce051d3045fe1a0c8a408c0d7402a1a1.tar
tangerine-wallet-browser-343a7e9cce051d3045fe1a0c8a408c0d7402a1a1.tar.gz
tangerine-wallet-browser-343a7e9cce051d3045fe1a0c8a408c0d7402a1a1.tar.bz2
tangerine-wallet-browser-343a7e9cce051d3045fe1a0c8a408c0d7402a1a1.tar.lz
tangerine-wallet-browser-343a7e9cce051d3045fe1a0c8a408c0d7402a1a1.tar.xz
tangerine-wallet-browser-343a7e9cce051d3045fe1a0c8a408c0d7402a1a1.tar.zst
tangerine-wallet-browser-343a7e9cce051d3045fe1a0c8a408c0d7402a1a1.zip
Transition to home view after tx error
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/actions.js23
1 files changed, 5 insertions, 18 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index eafd04b4c..eebe65ba2 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -97,7 +97,6 @@ var actions = {
cancelMsg: cancelMsg,
signPersonalMsg,
cancelPersonalMsg,
- sendTx: sendTx,
signTx: signTx,
updateAndApproveTx,
cancelTx: cancelTx,
@@ -397,26 +396,13 @@ function signPersonalMsg (msgData) {
function signTx (txData) {
return (dispatch) => {
+ dispatch(actions.showLoadingIndication())
global.ethQuery.sendTransaction(txData, (err, data) => {
dispatch(actions.hideLoadingIndication())
- if (err) return dispatch(actions.displayWarning(err.message))
- dispatch(actions.hideWarning())
- })
- dispatch(this.showConfTxPage())
- }
-}
-
-function sendTx (txData) {
- log.info(`actions - sendTx: ${JSON.stringify(txData.txParams)}`)
- return (dispatch) => {
- log.debug(`actions calling background.approveTransaction`)
- background.approveTransaction(txData.id, (err) => {
- if (err) {
- dispatch(actions.txError(err))
- return log.error(err.message)
- }
- dispatch(actions.completedTx(txData.id))
+ if (err) dispatch(actions.displayWarning(err.message))
+ dispatch(this.goHome())
})
+ dispatch(actions.showConfTxPage())
}
}
@@ -428,6 +414,7 @@ function updateAndApproveTx (txData) {
dispatch(actions.hideLoadingIndication())
if (err) {
dispatch(actions.txError(err))
+ dispatch(actions.goHome())
return log.error(err.message)
}
dispatch(actions.completedTx(txData.id))