Skip to content

Commit

Permalink
Bubble up tx signing errors
Browse files Browse the repository at this point in the history
Resolves #2062
  • Loading branch information
gabmontes committed Nov 23, 2018
1 parent 2fc11a1 commit 0da83f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,14 @@ Method.prototype.buildCall = function() {

// If wallet was found, sign tx, and send using sendRawTransaction
if (wallet && wallet.privateKey) {
return method.accounts.signTransaction(_.omit(tx, 'from'), wallet.privateKey).then(sendSignedTx);
return method.accounts.signTransaction(_.omit(tx, 'from'), wallet.privateKey)
.then(sendSignedTx)
.catch(function (err) {
if (defer.eventEmitter.emit) {
defer.eventEmitter.emit('error', err);
}
defer.reject(err);
});
}

// ETH_SIGN
Expand Down

0 comments on commit 0da83f7

Please sign in to comment.