File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
contract_manager/src/contracts Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -639,12 +639,15 @@ export class EvmPriceFeedContract extends PriceFeedContract {
639639 let web3 : Web3 ;
640640 let amount = BigInt ( 0 ) ;
641641 try {
642- web3 = this . chain . getViemDefaultWeb3 ( ) ;
643- amount = BigInt ( await web3 . eth . getBalance ( this . address ) ) ;
644- } catch ( error ) {
645642 // Fallback to regular web3 if viem default web3 fails
646643 web3 = this . chain . getWeb3 ( ) ;
647644 amount = BigInt ( await web3 . eth . getBalance ( this . address ) ) ;
645+ } catch ( error ) {
646+ console . error (
647+ "Error getting balance with given RPC, moving to viem default RPC" ,
648+ ) ;
649+ web3 = this . chain . getViemDefaultWeb3 ( ) ;
650+ amount = BigInt ( await web3 . eth . getBalance ( this . address ) ) ;
648651 }
649652 return {
650653 amount,
You can’t perform that action at this time.
0 commit comments