Skip to content

Commit

Permalink
Fixed null apiKey problem for InfuraProvider.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Nov 20, 2019
1 parent 19aaade commit e518151
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/providers/src.ts/infura-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e518151

Please sign in to comment.