Skip to content

Commit

Permalink
Merge branch '1.x' into dependabot/npm_and_yarn/packages/web3-eth-acc…
Browse files Browse the repository at this point in the history
…ounts/elliptic-6.5.3
  • Loading branch information
frankiebee committed Oct 19, 2020
2 parents 5b50273 + b3a7bc6 commit 1be3646
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ Released with 1.0.0-beta.37 code base.
## [1.3.1]

### Changed

- bump utils 0.10.0^ -> 0.12.0 (#3733)

### Removed
Expand All @@ -299,5 +300,6 @@ Released with 1.0.0-beta.37 code base.

### Fixed

- Fix possible unhandled promise rejection when sending a transaction (#3708)
- Fixed decoding bytes and string parameters for logs emitted with solc 0.4.x (#3724, #3738)
- Grammar changes to inputAddressFormatter error message
2 changes: 1 addition & 1 deletion docs/web3-eth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ Example
// using the callback
web3.eth.sendTransaction({
from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
data: code // deploying a contracrt
data: code // deploying a contract
}, function(error, hash){
...
});
Expand Down
9 changes: 7 additions & 2 deletions packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -725,17 +725,22 @@ Method.prototype.buildCall = function () {
txOptions.common = method.defaultCommon;
}

return method.accounts.signTransaction(txOptions, wallet.privateKey)
method.accounts.signTransaction(txOptions, wallet.privateKey)
.then(sendSignedTx)
.catch(function (err) {
if (_.isFunction(defer.eventEmitter.listeners) && defer.eventEmitter.listeners('error').length) {
defer.eventEmitter.emit('error', err);
try {
defer.eventEmitter.emit('error', err);
} catch (err) {
// Ignore userland error prevent it to bubble up within web3.
}
defer.eventEmitter.removeAllListeners();
defer.eventEmitter.catch(function () {
});
}
defer.reject(err);
});
return;
}

// ETH_SIGN
Expand Down

0 comments on commit 1be3646

Please sign in to comment.