Skip to content

Commit

Permalink
Fixed INFURA project ID checking (#534).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jun 4, 2019
1 parent e8f5e4a commit 5bf763f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/providers/src.ts/infura-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use strict";

import { isHexString } from "@ethersproject/bytes";
import * as errors from "@ethersproject/errors";
import { Network } from "@ethersproject/networks";

Expand All @@ -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;
}

Expand Down Expand Up @@ -45,6 +41,6 @@ export class InfuraProvider extends UrlJsonRpcProvider {
});
}

return "https://" + host + "/v3/" + apiKey;
return "https:/" + "/" + host + "/v3/" + apiKey;
}
}

0 comments on commit 5bf763f

Please sign in to comment.