Skip to content

Commit

Permalink
fix: filter existing RPC urls (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov authored Jul 12, 2024
1 parent 25e7edc commit 1432f87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ export const config = (() => {
if (!_config.rpcUrls[chainId]?.length) {
_config.rpcUrls[chainId] = Array.from(urls)
} else {
_config.rpcUrls[chainId]?.push(...urls)
const filteredUrls = urls.filter(
(url) => !_config.rpcUrls[chainId]?.includes(url)
)
_config.rpcUrls[chainId]?.push(...filteredUrls)
}
}
},
Expand Down

0 comments on commit 1432f87

Please sign in to comment.