diff options
Restored signTx action
Diffstat (limited to 'ui/app/actions.js')
-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) => { |