diff --git a/packages/providers/src.ts/infura-provider.ts b/packages/providers/src.ts/infura-provider.ts index 795eeb1a5f..a2d31285cd 100644 --- a/packages/providers/src.ts/infura-provider.ts +++ b/packages/providers/src.ts/infura-provider.ts @@ -18,11 +18,13 @@ export class InfuraProvider extends UrlJsonRpcProvider { static getApiKey(apiKey: any): any { const apiKeyObj: { apiKey: string, projectId: string, projectSecret: string } = { - apiKey: null, + apiKey: defaultProjectId, projectId: defaultProjectId, projectSecret: null }; + if (apiKey == null) { return apiKeyObj; } + if (typeof(apiKey) === "string") { apiKeyObj.projectId = apiKey;