This repository was archived by the owner on Mar 5, 2025. It is now read-only.
File tree 3 files changed +10
-3
lines changed
packages/web3-core-method/src
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,7 @@ Released with 1.0.0-beta.37 code base.
291
291
## [ 1.3.1]
292
292
293
293
### Changed
294
+
294
295
- bump utils 0.10.0^ -> 0.12.0 (#3733 )
295
296
296
297
### Removed
@@ -299,5 +300,6 @@ Released with 1.0.0-beta.37 code base.
299
300
300
301
### Fixed
301
302
303
+ - Fix possible unhandled promise rejection when sending a transaction (#3708 )
302
304
- Fixed decoding bytes and string parameters for logs emitted with solc 0.4.x (#3724 , #3738 )
303
305
- Grammar changes to inputAddressFormatter error message
Original file line number Diff line number Diff line change @@ -1466,7 +1466,7 @@ Example
1466
1466
// using the callback
1467
1467
web3 .eth .sendTransaction ({
1468
1468
from: ' 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe' ,
1469
- data: code // deploying a contracrt
1469
+ data: code // deploying a contract
1470
1470
}, function (error , hash ){
1471
1471
...
1472
1472
});
Original file line number Diff line number Diff line change @@ -725,17 +725,22 @@ Method.prototype.buildCall = function () {
725
725
txOptions . common = method . defaultCommon ;
726
726
}
727
727
728
- return method . accounts . signTransaction ( txOptions , wallet . privateKey )
728
+ method . accounts . signTransaction ( txOptions , wallet . privateKey )
729
729
. then ( sendSignedTx )
730
730
. catch ( function ( err ) {
731
731
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
+ }
733
737
defer . eventEmitter . removeAllListeners ( ) ;
734
738
defer . eventEmitter . catch ( function ( ) {
735
739
} ) ;
736
740
}
737
741
defer . reject ( err ) ;
738
742
} ) ;
743
+ return ;
739
744
}
740
745
741
746
// ETH_SIGN
You can’t perform that action at this time.
0 commit comments