From ffb464ce3dac8a0c96aeacaf04667e601ad2c6bb Mon Sep 17 00:00:00 2001 From: cedoor Date: Wed, 14 Feb 2024 17:46:09 +0000 Subject: [PATCH] fix(data): update provider parameters --- packages/data/src/ethers.ts | 4 ++-- packages/data/src/types/index.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/data/src/ethers.ts b/packages/data/src/ethers.ts index 89acb0b6f..818ab4bc5 100644 --- a/packages/data/src/ethers.ts +++ b/packages/data/src/ethers.ts @@ -75,7 +75,7 @@ export default class SemaphoreEthers { switch (options.provider) { case "infura": - provider = new InfuraProvider(networkOrEthereumURL, options.apiKey) + provider = new InfuraProvider(networkOrEthereumURL, options.projectId, options.projectSecret) break case "alchemy": provider = new AlchemyProvider(networkOrEthereumURL, options.apiKey) @@ -87,7 +87,7 @@ export default class SemaphoreEthers { provider = new EtherscanProvider(networkOrEthereumURL, options.apiKey) break case "pocket": - provider = new PocketProvider(networkOrEthereumURL, options.apiKey) + provider = new PocketProvider(networkOrEthereumURL, options.applicationId, options.applicationSecret) break case "ankr": provider = new AnkrProvider(networkOrEthereumURL, options.apiKey) diff --git a/packages/data/src/types/index.ts b/packages/data/src/types/index.ts index d6f3d11b3..019c252bc 100644 --- a/packages/data/src/types/index.ts +++ b/packages/data/src/types/index.ts @@ -54,4 +54,8 @@ export type EthersOptions = { startBlock?: number provider?: "etherscan" | "infura" | "alchemy" | "cloudflare" | "pocket" | "ankr" apiKey?: string + projectId?: string // Infura + projectSecret?: string // Infura + applicationId?: string // Pocket + applicationSecret?: string // Pocket }