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

Fully deprecate v1 Infura API #462

Closed
wants to merge 1 commit into from
Closed

Conversation

kshinn
Copy link

@kshinn kshinn commented Mar 20, 2019

As of March 27, Infura is going to be deprecating the old style API access. All requests will be stopped with the legacy endpoint. Consider fully deprecating and issuing a friendly error message that a new style projectId needs to be used.

@ricmoo
Copy link
Member

ricmoo commented Mar 20, 2019

Yes, that’s a good idea. I will be posting a message to the ethersproject Twitter this week (it is a low-traffic Account specifically for these sorts of events ;)).

I will likely wait until after the switch over; I’m curious what will happen to legacy call, and if they don’t fail completely, will use errors.warn.

I’ll keep this PR updated though. :)

@ricmoo
Copy link
Member

ricmoo commented May 24, 2019

Hmmm... Is this the best option, now that I'm looking more into it? Do old urls simply not work? It seems like a change in behaviour to be a synchronous error, rather than a failure when it tries sending.

It is certainly more useful to new developers for it to fail like this, synchronously, but you can imagine someone with multiple backends, à la:

let infuraProvider = ...
let etherscanProvider = ...
let provider = new ethers.providers.FallbackProvider([ infuraProvider, etherscanProvider ]);

This code, would still work, even if the INFURA backend fails. But without a try/catch block, it would fail at a weird part of the library that used to not be able to fail. :s

I think I may hold off on this change, but in v5 the legacy method is not even available, so the migration path may just include waiting.

I would also consider putting a error.warn in the top of perform in the event they are using the legacy method. Would that compromise appease all involved? :)

@ricmoo ricmoo added discussion Questions, feedback and general information. next version labels May 24, 2019
@ricmoo
Copy link
Member

ricmoo commented Jun 4, 2019

I've added a warning to the InfuraProvider when using the legacy API key. Closing this now, but feel free to continue discussion, I monitor closed issues.

Thanks! :)

@ricmoo ricmoo closed this Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Questions, feedback and general information.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants