Skip to content

Commit 5ce4e40

Browse files
committed
feat: fallback to first explorer is no EIP3091 explorer presents
1 parent e54712c commit 5ce4e40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/services/chain-service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ export class ChainService {
208208
const chains = rawChains.map((rawChain): ListedChain => {
209209
const chainId = eip155ChainIdToString(BigInt(rawChain.chainId));
210210
const name = rawChain.title || rawChain.name;
211-
const explorer = rawChain.explorers?.find(
212-
explorer => explorer.standard === 'EIP3091',
213-
)?.url;
211+
const explorer =
212+
rawChain.explorers?.find(explorer => explorer.standard === 'EIP3091')
213+
?.url ?? rawChain.explorers?.[0]?.url;
214214

215215
return {
216216
id: chainId,

0 commit comments

Comments
 (0)