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

Add chainId event #6

Merged
merged 1 commit into from
Sep 9, 2019
Merged

Add chainId event #6

merged 1 commit into from
Sep 9, 2019

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Sep 5, 2019

resolves MetaMask/metamask-extension#6885

The metamask inpage provider now emits a 'chainIdChanged' event when the chain id changes in metamask state

Paired with: MetaMask/metamask-extension#7110

index.js Outdated
@@ -36,6 +37,8 @@ function MetamaskInpageProvider (connectionStream) {
// Emit events for some state changes
self.publicConfigStore.subscribe(function (state) {

console.log('!!! metamask-inpage-provider state', state)
Copy link
Member

Choose a reason for hiding this comment

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

Leftover console.log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

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.

Looks good!

@danfinlay danfinlay merged commit e901bff into MetaMask:master Sep 9, 2019
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.

Add chainId event
3 participants