File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -491,10 +491,15 @@ export default class SmartTransactionsController extends BaseController<
491
491
) ;
492
492
const time = Date . now ( ) ;
493
493
const metamaskNetworkId = this . getNetwork ( ) ;
494
- const preTxBalanceBN = await this . ethersProvider . getBalance ( txParams ?. from ) ;
495
- const preTxBalance = new BigNumber ( preTxBalanceBN . toHexString ( ) ) . toString (
496
- 16 ,
497
- ) ;
494
+ let preTxBalance ;
495
+ try {
496
+ const preTxBalanceBN = await this . ethersProvider . getBalance (
497
+ txParams ?. from ,
498
+ ) ;
499
+ preTxBalance = new BigNumber ( preTxBalanceBN . toHexString ( ) ) . toString ( 16 ) ;
500
+ } catch ( e ) {
501
+ console . error ( 'ethers error' , e ) ;
502
+ }
498
503
const nonceLock = await this . nonceTracker . getNonceLock ( txParams ?. from ) ;
499
504
const nonce = ethers . utils . hexlify ( nonceLock . nextNonce ) ;
500
505
if ( txParams && ! txParams ?. nonce ) {
You can’t perform that action at this time.
0 commit comments