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

[DO NOT MERGE] Add very simple subscription support #5450

Closed
wants to merge 1 commit into from

Conversation

danfinlay
Copy link
Contributor

@danfinlay danfinlay commented Oct 7, 2018

Posted to validate fix, do not merge until affected dev confirms.

While MetaMask never officially supported subscriptions, we added a
subscription subprovider to our provider-engine, which people began
building on.

We have since moved to json-rpc-engine, which lacks this subprovider. We
thought this would be fine, since we never officially supported it, but
apparently even Drizzle was building its UI framework on this API
expectation, so we decided breaking was unacceptable.

Rather than completely engineer a new subscription subprovider for
json-rpc-engine, or add websocket support (yet), I came up with a very
simple way of integrating our old support into the new inpage-provider.

Should have the added benefit of automatic memory management,
potentially solving memory leaks related to the old subscription
support.

Likely fixes #5425, pushing as a PR so we can provide the build to those
affected devs and see if this fixes their issue.

Relevant code changes visible here in metamask-inpage-provider.

I did my own validation & bug reproduction using this test repo that I composed based on this comment.

While MetaMask never officially supported subscriptions, we added a
subscription subprovider to our provider-engine, which people began
building on.

We have since moved to json-rpc-engine, which lacks this subprovider. We
thought this would be fine, since we never officially supported it, but
apparently even Drizzle was building its UI framework on this API
expectation, so we decided breaking was unacceptable.

Rather than completely engineer a new subscription subprovider for
json-rpc-engine, or add websocket support (yet), I came up with a very
simple way of integrating our old support into the new inpage-provider.

Should have the added benefit of automatic memory management,
potentially solving memory leaks related to the old subscription
support.

Likely fixes #5425, pushing as a PR so we can provide the build to those
affected devs and see if this fixes their issue.
@danfinlay
Copy link
Contributor Author

Hopefully replaced by the more comprehensive & thorough #5458.

@whymarrh whymarrh mentioned this pull request Oct 9, 2018
@whymarrh
Copy link
Contributor

whymarrh commented Oct 9, 2018

@danfinlay should we close this now that #5458 is merged?

@bdresser bdresser closed this Oct 10, 2018
@whymarrh whymarrh deleted the i5449-SimpleSubscriptionSupport branch January 15, 2020 17:02
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.

Transaction receipt callback is not called on Metamask 4.12
3 participants