1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Restored signTx action

This commit is contained in:
Dan Finlay 2016-05-06 14:46:04 -07:00
parent 356da540d1
commit c30a67b2de

View File

@ -61,6 +61,7 @@ var actions = {
signMsg: signMsg, signMsg: signMsg,
cancelMsg: cancelMsg, cancelMsg: cancelMsg,
sendTx: sendTx, sendTx: sendTx,
signTx: signTx,
cancelTx: cancelTx, cancelTx: cancelTx,
completedTx: completedTx, completedTx: completedTx,
txError: txError, 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) { function sendTx(txData) {
return (dispatch) => { return (dispatch) => {
_accountManager.approveTransaction(txData.id, (err) => { _accountManager.approveTransaction(txData.id, (err) => {