Ethers Version
main
Search Terms
defaultProvider, PocketProvider, api key
Describe the Problem
When constructing a default provider using the following:
ethers.getDefaultProvider(network.name, {infura: INFURA_ID, etherscan: ETHERSCAN_ID, alchemy: ALCHEMY_ID, pocket: POCKET_ID});
A fallback provider is created. Inspecting the resulting object shows that the Pocket Provider apiKey is the default (which exists in the code here) instead of my configured key.
We can see that the configuration is not passed to the constructor on this line.
Code Snippet
`
const provider = ethers.getDefaultProvider(network.name, {pocket: POCKET_ID});
if(provider.providerConfigs.find(x => {
return x.provider.constructor.name == "PocketProvider"
}).provider.applicationId !== POCKET_ID){
console.error("These keys don't match");
}
`
Contract ABI
No response
Errors
No response
Environment
No response
Environment (Other)
No response
Ethers Version
main
Search Terms
defaultProvider, PocketProvider, api key
Describe the Problem
When constructing a default provider using the following:
ethers.getDefaultProvider(network.name, {infura: INFURA_ID, etherscan: ETHERSCAN_ID, alchemy: ALCHEMY_ID, pocket: POCKET_ID});A fallback provider is created. Inspecting the resulting object shows that the Pocket Provider apiKey is the default (which exists in the code here) instead of my configured key.
We can see that the configuration is not passed to the constructor on this line.
Code Snippet
Contract ABI
No response
Errors
No response
Environment
No response
Environment (Other)
No response