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

Commit

Permalink
Remove invalid networks check from Sourcify fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
haltman-at committed Aug 25, 2023
1 parent cc26d74 commit 341a7f5
Showing 1 changed file with 3 additions and 7 deletions.
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

0 comments on commit 341a7f5

Please sign in to comment.