Skip to content

Commit

Permalink
Merge branch 'develop' into pablo/the-endless-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Marketen authored Oct 2, 2023
2 parents 3bb4f81 + 110be03 commit b040468
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/dappmanager/src/modules/chains/drivers/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export async function ethereum(
const provider = new ethers.providers.JsonRpcProvider(apiUrl);
const [syncing, peersCount, blockNumber] = await Promise.all([
provider.send("eth_syncing", []).then(parseEthersSyncing),
provider.send("net_peerCount", []).then(parseInt),
// net_peerCount is not always available. OP Erigon does not support it
// Not logging error because it would flood the logs
provider.send("net_peerCount", []).then(parseInt).catch(() => undefined),
provider.getBlockNumber()
]);

Expand All @@ -67,7 +69,7 @@ export async function ethereum(
export function parseEthereumState(
syncing: EthSyncing,
blockNumber: number,
peersCount: number
peersCount?: number
): ChainDataResult {
if (syncing) {
const {
Expand Down

0 comments on commit b040468

Please sign in to comment.