Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Remove invalid networks check from Sourcify fetcher #6171

Merged
merged 2 commits into from
Aug 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions packages/source-fetcher/lib/sourcify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const debug = debugModule("source-fetcher:sourcify");

import type { Fetcher, FetcherConstructor } from "./types";
import type * as Types from "./types";
import { removeLibraries, InvalidNetworkError } from "./common";
import { removeLibraries } from "./common";
import { networkNamesById, networksByName } from "./networks";
import retry from "async-retry";

Expand Down Expand Up @@ -164,12 +164,8 @@ const SourcifyFetcher: FetcherConstructor = class SourcifyFetcher
constructor(networkId: number) {
this.networkId = networkId;
this.networkName = networkNamesById[networkId];
if (
this.networkName === undefined ||
!SourcifyFetcher.supportedNetworks.has(this.networkName)
) {
throw new InvalidNetworkError(networkId, "sourcify");
}
//we no longer check if the network is supported; the list is now only
//used for if you explicitly ask
}

static getSupportedNetworks(): Types.SupportedNetworks {
Expand Down