diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-05-07 05:49:38 +0800 |
---|---|---|
committer | kumavis <kumavis@users.noreply.github.com> | 2016-05-07 05:49:38 +0800 |
commit | 601d870592b5d79b4a109a2dd825cb7966457dd7 (patch) | |
tree | 1a4f8aeb96d4b8456d35cf3dbb8ee14357944edf /ui/app/actions.js | |
parent | edf4e2bc5b5964446104b8ab4a7d6eae2d0ed0cd (diff) | |
parent | c30a67b2deb06c5d47990ccac74d9d55384bfe2e (diff) | |
download | tangerine-wallet-browser-601d870592b5d79b4a109a2dd825cb7966457dd7.tar tangerine-wallet-browser-601d870592b5d79b4a109a2dd825cb7966457dd7.tar.gz tangerine-wallet-browser-601d870592b5d79b4a109a2dd825cb7966457dd7.tar.bz2 tangerine-wallet-browser-601d870592b5d79b4a109a2dd825cb7966457dd7.tar.lz tangerine-wallet-browser-601d870592b5d79b4a109a2dd825cb7966457dd7.tar.xz tangerine-wallet-browser-601d870592b5d79b4a109a2dd825cb7966457dd7.tar.zst tangerine-wallet-browser-601d870592b5d79b4a109a2dd825cb7966457dd7.zip |
Merge pull request #180 from MetaMask/PrettierTransactionList
Prettier transaction list
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) => { |