File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
packages/web3-core-method/src Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -65,4 +65,5 @@ Released with 1.0.0-beta.37 code base.
6565- Fix incorrectly populating chainId param with ` net_version ` when signing txs (#2378 )
6666- regeneratorRuntime error fixed (#3058 )
6767- Fix accessing event.name where event is undefined (#3014 )
68+ - Fix bubbling up tx signing errors (#2063 , #3105 )
6869- HttpProvider: CORS issue with Firefox and Safari (#2978 )
Original file line number Diff line number Diff line change @@ -533,7 +533,16 @@ Method.prototype.buildCall = function() {
533533
534534 // If wallet was found, sign tx, and send using sendRawTransaction
535535 if ( wallet && wallet . privateKey ) {
536- return method . accounts . signTransaction ( _ . omit ( tx , 'from' ) , wallet . privateKey ) . then ( sendSignedTx ) ;
536+ return method . accounts . signTransaction ( _ . omit ( tx , 'from' ) , wallet . privateKey )
537+ . then ( sendSignedTx )
538+ . catch ( function ( err ) {
539+ if ( _ . isFunction ( defer . eventEmitter . listeners ) && defer . eventEmitter . listeners ( 'error' ) . length ) {
540+ defer . eventEmitter . emit ( 'error' , err ) ;
541+ defer . eventEmitter . removeAllListeners ( ) ;
542+ defer . eventEmitter . catch ( function ( ) { } ) ;
543+ }
544+ defer . reject ( err ) ;
545+ } ) ;
537546 }
538547
539548 // ETH_SIGN
You can’t perform that action at this time.
0 commit comments