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

Convert logger to instance variable #118

Merged
merged 1 commit into from
Dec 4, 2020
Merged

Convert logger to instance variable #118

merged 1 commit into from
Dec 4, 2020

Conversation

rekmarks
Copy link
Member

@rekmarks rekmarks commented Dec 4, 2020

The log variable in MetaMaskProvider.js was set in that file's global scope. If multiple providers were initialized in the same JavaScript process, giving different loggers to each would change the logger across all of them.

This PR converts the log variable to a _log property on the provider.

@rekmarks rekmarks requested a review from a team as a code owner December 4, 2020 03:58
@rekmarks rekmarks requested a review from Gudahtt December 4, 2020 03:58
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM, good catch!

@rekmarks rekmarks merged commit 87ef029 into main Dec 4, 2020
@rekmarks rekmarks deleted the no-singleton-log branch December 4, 2020 16:09
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.

2 participants