Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getDefaultProvider method don't override network configuration #959

Closed
0xGabi opened this issue Jul 15, 2020 · 4 comments
Closed

getDefaultProvider method don't override network configuration #959

0xGabi opened this issue Jul 15, 2020 · 4 comments
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@0xGabi
Copy link

0xGabi commented Jul 15, 2020

We are using ethers to initialize our provider using getDefaultProvider method. We pass a custom network object with the following structure, using a custom ensAddress:

const network = {
      chainId: 4,
      ensAddress: '0x98df287b6c145399aaa709692c8d308357bc085d',
      name: 'rinkeby',
}

Regardless after calling the method like: ethers.getDefaultProvider(network) we still have the provider initialized with the default values:

{
  chainId:4
  ensAddress:'0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
  name:'rinkeby'
}

Here is the logic where we are handling this on our project: link.

Note: This is working fine if we use another kind of provider (e.g. WebSocket)

@0xGabi 0xGabi mentioned this issue Jul 15, 2020
9 tasks
@ricmoo ricmoo added the investigate Under investigation and may be a bug. label Jul 15, 2020
@ricmoo
Copy link
Member

ricmoo commented Jul 15, 2020

I think I may know the issue. I'll look into this shortly.

@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. and removed investigate Under investigation and may be a bug. labels Jul 16, 2020
@ricmoo
Copy link
Member

ricmoo commented Jul 19, 2020

This should be fixed in v5.0.6. Try it out and let me know if you still have any issues. :)

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Jul 19, 2020
@bpierre
Copy link

bpierre commented Jul 20, 2020

It seems to be working fine now, thanks @ricmoo! 🙏

@ricmoo
Copy link
Member

ricmoo commented Jul 20, 2020

Awesome! I’ll close this then.

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

No branches or pull requests

3 participants