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

Fix method registry initialization #8200

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Mar 16, 2020

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 requested review from danjm and whymarrh as code owners March 16, 2020 23:56
@Gudahtt Gudahtt force-pushed the fix-method-registry-initialization branch from 8469960 to 8ecc81a Compare March 16, 2020 23:57
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 fix-method-registry-initialization branch from 8ecc81a to c38b5b5 Compare March 16, 2020 23:58
@Gudahtt Gudahtt requested a review from rickycodes March 17, 2020 00:07
@metamaskbot
Copy link
Collaborator

Builds ready [c38b5b5]
Page Load Metrics (677 ± 41 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeNotificationfirstPaint36119672914
domContentLoaded3557876768742
load3587896778641
domInteractive3547876758742

Copy link
Contributor

@tmashuang tmashuang left a comment

Choose a reason for hiding this comment

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

LGTM

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 merged commit 91f6dfc into develop Mar 17, 2020
@Gudahtt Gudahtt deleted the fix-method-registry-initialization branch March 17, 2020 14:14
Gudahtt added a commit that referenced this pull request 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 added a commit that referenced this pull request 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.
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.

5 participants