From 1b8921136f5f00bf274928cf035d998dd0af0cc1 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 4 Jun 2019 16:03:31 -0400 Subject: [PATCH] Fixed INFURA project ID checking (#534). --- src.ts/infura-provider.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src.ts/infura-provider.ts b/src.ts/infura-provider.ts index 24a38debb3..9d00dfbf9d 100644 --- a/src.ts/infura-provider.ts +++ b/src.ts/infura-provider.ts @@ -1,6 +1,5 @@ "use strict"; -import { isHexString } from "@ethersproject/bytes"; import * as errors from "@ethersproject/errors"; import { Network } from "@ethersproject/networks"; @@ -14,9 +13,6 @@ export class InfuraProvider extends UrlJsonRpcProvider { static getApiKey(apiKey: string): string { if (apiKey == null) { return defaultProjectId; } - if (!isHexString(apiKey, 16)) { - errors.throwArgumentError("invalid projectId", "projectId", apiKey); - } return apiKey; } @@ -45,6 +41,6 @@ export class InfuraProvider extends UrlJsonRpcProvider { }); } - return "https://" + host + "/v3/" + apiKey; + return "https:/" + "/" + host + "/v3/" + apiKey; } }