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

Rename close event to disconnect #3773

Merged
merged 6 commits into from
Nov 16, 2020
Merged

Rename close event to disconnect #3773

merged 6 commits into from
Nov 16, 2020

Conversation

koraykoska
Copy link

@koraykoska koraykoska commented Nov 4, 2020

Fixes #3699

We will need to make sure that the close event is still added for old providers. Either by comparing versions or by registering both, which would lead to the same warning Metamask users experience right now for newer providers.

@koraykoska
Copy link
Author

As described in the EIP this change has to be a strict superset, which means we are required to support the close event as well. This is what it does right now

@coveralls
Copy link

coveralls commented Nov 9, 2020

Coverage Status

Coverage increased (+0.01%) to 80.423% when pulling ad58a2a on fix/metamask-issue into ee8bec9 on 1.x.

@frankiebee
Copy link
Contributor

in order to be backwards compatible we probably still need to keep around the close event listener right?

@koraykoska
Copy link
Author

@frankiebee Yeah that's why I included the close event.

@koraykoska
Copy link
Author

@GregTheGreek

@@ -11,6 +11,7 @@ set -o errexit
# Install ganache-core
git clone https://github.com/trufflesuite/ganache-core
cd ganache-core
git checkout tags/v2.13.0
Copy link
Contributor

Choose a reason for hiding this comment

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

is this because we need that version for disconnect event?

Copy link
Author

Choose a reason for hiding this comment

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

@frankiebee Not really. First of all I don't see why we should take the newest develop branch commit as they have stable releases. Second, and more importantly, I stumbled upon this because the e2e Tests with ganache failed. The reason is that they added a patch file to their package.json after install script which should change a version of a dependency. But weirdly this patch file is broken. So rolling back to the release 2.13.0 fixed the issue.

I will make a PR at ganache-core to fix this issue and after that we can use the newest version again. But I would always add an explicit version to prevent tests from failing at some point with the same commit they passed before.

Copy link
Contributor

@frankiebee frankiebee 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 to me thanks

@GregTheGreek GregTheGreek merged commit 942161c into 1.x Nov 16, 2020
@GregTheGreek GregTheGreek deleted the fix/metamask-issue branch November 16, 2020 20:19
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.

Metamask-deprecated .on({data, close}) used in constructor
4 participants