diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-05-07 05:46:04 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-05-07 05:46:04 +0800 |
commit | c30a67b2deb06c5d47990ccac74d9d55384bfe2e (patch) | |
tree | 1a4f8aeb96d4b8456d35cf3dbb8ee14357944edf /ui | |
parent | 356da540d12871bdb78f8dca8acdc6b9c5a523ec (diff) | |
download | tangerine-wallet-browser-c30a67b2deb06c5d47990ccac74d9d55384bfe2e.tar tangerine-wallet-browser-c30a67b2deb06c5d47990ccac74d9d55384bfe2e.tar.gz tangerine-wallet-browser-c30a67b2deb06c5d47990ccac74d9d55384bfe2e.tar.bz2 tangerine-wallet-browser-c30a67b2deb06c5d47990ccac74d9d55384bfe2e.tar.lz tangerine-wallet-browser-c30a67b2deb06c5d47990ccac74d9d55384bfe2e.tar.xz tangerine-wallet-browser-c30a67b2deb06c5d47990ccac74d9d55384bfe2e.tar.zst tangerine-wallet-browser-c30a67b2deb06c5d47990ccac74d9d55384bfe2e.zip |
Restored signTx action
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 9a8ba76d1..5e4a0d7da 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -61,6 +61,7 @@ var actions = { signMsg: signMsg, cancelMsg: cancelMsg, sendTx: sendTx, + signTx: signTx, cancelTx: cancelTx, completedTx: completedTx, txError: txError, @@ -165,6 +166,20 @@ function signMsg(msgData) { } } +function signTx(txData) { + return (dispatch) => { + dispatch(this.showLoadingIndication()) + + web3.eth.sendTransaction(txData, (err, data) => { + dispatch(this.hideLoadingIndication()) + + if (err) return dispatch(this.displayWarning(err.message)) + dispatch(this.hideWarning()) + dispatch(this.goHome()) + }) + } +} + function sendTx(txData) { return (dispatch) => { _accountManager.approveTransaction(txData.id, (err) => { |