@@ -3413,14 +3413,11 @@ class MainController {
34133413 try {
34143414 // For background transaction updates, do not toggle UI loading flags
34153415
3416- // Safe access to transaction objects with error handling
3417- const web3Provider = this . ethereumTransaction ?. web3Provider ;
34183416 const txs =
34193417 await this . transactionsManager . utils . updateTransactionsFromCurrentAccount (
34203418 currentAccount ,
34213419 isBitcoinBased ,
34223420 activeNetwork . url ,
3423- web3Provider ,
34243421 currentAccountTxs ,
34253422 isPolling ,
34263423 isRapidPolling
@@ -4053,16 +4050,11 @@ class MainController {
40534050 const startTime = Date . now ( ) ;
40544051
40554052 try {
4056- // Safe access to transaction objects with error handling
4057- const web3Provider = this . ethereumTransaction ?. web3Provider ;
4058-
40594053 const updatedBalance =
40604054 await this . balancesManager . utils . getBalanceUpdatedForAccount (
40614055 currentAccount ,
40624056 isBitcoinBased ,
4063- activeNetwork . url ,
4064- web3Provider
4065- // No need to pass a provider - let the manager use its own
4057+ activeNetwork . url
40664058 ) ;
40674059
40684060 // Calculate latency
@@ -5471,16 +5463,10 @@ class MainController {
54715463 throw new Error ( 'NFT validation only supported on EVM networks' ) ;
54725464 }
54735465
5474- const abortController = new AbortController ( ) ;
5475- const provider = new CustomJsonRpcProvider (
5476- abortController . signal ,
5477- activeNetwork . url
5478- ) ;
5479-
54805466 return this . evmAssetsController . validateNftContract (
54815467 contractAddress ,
54825468 walletAddress ,
5483- provider
5469+ this . ethereumTransaction . web3Provider
54845470 ) ;
54855471 }
54865472
@@ -5737,23 +5723,11 @@ class MainController {
57375723 networkUrl : string
57385724 ) : Promise < string > {
57395725 try {
5740- // For EVM networks, use the existing web3 provider
5741- const provider = isBitcoinBased
5742- ? null
5743- : this . ethereumTransaction . web3Provider ;
5744-
5745- if ( ! isBitcoinBased && ! provider ) {
5746- console . error (
5747- '[MainController] No web3 provider available for EVM network'
5748- ) ;
5749- return '0' ;
5750- }
57515726 const balance =
57525727 await this . balancesManager . utils . getBalanceUpdatedForAccount (
57535728 account ,
57545729 isBitcoinBased ,
5755- networkUrl ,
5756- provider
5730+ networkUrl
57575731 ) ;
57585732
57595733 return balance ;
0 commit comments