Skip to content

Commit

Permalink
Merge pull request #668 from EdgeApp/paul/fixEvmSync
Browse files Browse the repository at this point in the history
Fix failed sync of evm wallets
  • Loading branch information
samholmes authored Nov 13, 2023
2 parents b991147 + d63585c commit deecf06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- fixed: EVM balance sync failure if missing API key for one node type

## 2.11.1 (2023-11-10)

- fixed: Use transaction type 0 (legacy transactions) currencies which do no support EIP-1559
Expand Down
8 changes: 7 additions & 1 deletion src/ethereum/EthereumNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,13 @@ export class EthereumNetwork {

let funcs: Array<() => Promise<any>> = []
rpcServers.forEach(rpcServer => {
const rpcServerWithApiKey = this.addRpcApiKey(rpcServer)
let rpcServerWithApiKey: string
try {
rpcServerWithApiKey = this.addRpcApiKey(rpcServer)
} catch (e) {
// addRpcApiKey can throw if there's a missing apikey. skip this rpcServer
return
}
const ethProvider = new ethers.providers.JsonRpcProvider(
rpcServerWithApiKey,
chainParams.chainId
Expand Down

0 comments on commit deecf06

Please sign in to comment.