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

Backport "Fix method registry initialization (#8200)" #8459

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Apr 29, 2020

Backport #8200 to v7.7.9. Original commit description:

The method registry was being initialized with the global variable ethereumProvider before that variable was set. As a result, the method registry was falling back to an internally constructed provider that used the wrong provider URL (an obsolete Infura API). This was resulting in an error with the message "Project ID not found".

The method registry is now initialized lazily, when it's first needed. This should be well after the initialization of ethereumProvider, which occurs during the UI initialization.

@Gudahtt Gudahtt force-pushed the backport-fix-method-registry-initialization branch from 4eab25d to d36b004 Compare April 29, 2020 15:59
@metamaskbot
Copy link
Collaborator

Builds ready [d36b004]

@Gudahtt Gudahtt marked this pull request as ready for review April 29, 2020 17:35
@Gudahtt Gudahtt requested review from danjm and whymarrh as code owners April 29, 2020 17:35
whymarrh
whymarrh previously approved these changes Apr 29, 2020
Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gudahtt Gudahtt force-pushed the backport-fix-method-registry-initialization branch from d36b004 to 9eed8e0 Compare April 29, 2020 18:18
@metamaskbot
Copy link
Collaborator

Builds ready [9eed8e0]

Backport #8200 to v7.7.9. Original commit description:

The method registry was being initialized with the global variable
`ethereumProvider` before that variable was set. As a result, the
method registry was falling back to an internally constructed provider
that used the wrong provider URL (an obsolete Infura API). This was
resulting in an error with the message "Project ID not found".

The method registry is now initialized lazily, when it's first needed.
This should be well after the initialization of `ethereumProvider`,
which occurs during the UI initialization.
@Gudahtt Gudahtt force-pushed the backport-fix-method-registry-initialization branch from 9eed8e0 to fe30e40 Compare April 29, 2020 19:19
@metamaskbot
Copy link
Collaborator

Builds ready [fe30e40]

@Gudahtt Gudahtt merged commit 3dc8387 into Version-v7.7.9 Apr 29, 2020
@Gudahtt Gudahtt deleted the backport-fix-method-registry-initialization branch April 29, 2020 20:02
@metamaskbot metamaskbot mentioned this pull request May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants