Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 1be3646

Browse files
authored
Merge branch '1.x' into dependabot/npm_and_yarn/packages/web3-eth-accounts/elliptic-6.5.3
2 parents 5b50273 + b3a7bc6 commit 1be3646

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ Released with 1.0.0-beta.37 code base.
291291
## [1.3.1]
292292

293293
### Changed
294+
294295
- bump utils 0.10.0^ -> 0.12.0 (#3733)
295296

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

300301
### Fixed
301302

303+
- Fix possible unhandled promise rejection when sending a transaction (#3708)
302304
- Fixed decoding bytes and string parameters for logs emitted with solc 0.4.x (#3724, #3738)
303305
- Grammar changes to inputAddressFormatter error message

docs/web3-eth.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,7 @@ Example
14661466
// using the callback
14671467
web3.eth.sendTransaction({
14681468
from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
1469-
data: code // deploying a contracrt
1469+
data: code // deploying a contract
14701470
}, function(error, hash){
14711471
...
14721472
});

packages/web3-core-method/src/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,17 +725,22 @@ Method.prototype.buildCall = function () {
725725
txOptions.common = method.defaultCommon;
726726
}
727727

728-
return method.accounts.signTransaction(txOptions, wallet.privateKey)
728+
method.accounts.signTransaction(txOptions, wallet.privateKey)
729729
.then(sendSignedTx)
730730
.catch(function (err) {
731731
if (_.isFunction(defer.eventEmitter.listeners) && defer.eventEmitter.listeners('error').length) {
732-
defer.eventEmitter.emit('error', err);
732+
try {
733+
defer.eventEmitter.emit('error', err);
734+
} catch (err) {
735+
// Ignore userland error prevent it to bubble up within web3.
736+
}
733737
defer.eventEmitter.removeAllListeners();
734738
defer.eventEmitter.catch(function () {
735739
});
736740
}
737741
defer.reject(err);
738742
});
743+
return;
739744
}
740745

741746
// ETH_SIGN

0 commit comments

Comments
 (0)