|
|
@@ -639,11 +639,13 @@ export class EvmPriceFeedContract extends PriceFeedContract {
|
|
|
let web3: Web3;
|
|
|
let amount = BigInt(0);
|
|
|
try {
|
|
|
- web3 = this.chain.getViemDefaultWeb3();
|
|
|
+ web3 = this.chain.getWeb3();
|
|
|
amount = BigInt(await web3.eth.getBalance(this.address));
|
|
|
} catch (error) {
|
|
|
- // Fallback to regular web3 if viem default web3 fails
|
|
|
- web3 = this.chain.getWeb3();
|
|
|
+ console.error(
|
|
|
+ "Error getting balance with given RPC, moving to viem default RPC",
|
|
|
+ );
|
|
|
+ web3 = this.chain.getViemDefaultWeb3();
|
|
|
amount = BigInt(await web3.eth.getBalance(this.address));
|
|
|
}
|
|
|
return {
|