Skip to content

Commit

Permalink
fix(data): update provider parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
cedoor committed Feb 14, 2024
1 parent 4d1eb7d commit ffb464c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/data/src/ethers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions packages/data/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit ffb464c

Please sign in to comment.