{"action":"created","issue":{"url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/4703","repository_url":"https://api.github.com/repos/MetaMask/metamask-extension","labels_url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/4703/labels{/name}","comments_url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/4703/comments","events_url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/4703/events","html_url":"https://github.com/MetaMask/metamask-extension/pull/4703","id":337355415,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NTYyODU3","number":4703,"title":"EIP-1102: Opt-in provider access","user":{"login":"bitpshr","id":334586,"node_id":"MDQ6VXNlcjMzNDU4Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/334586?v=4","gravatar_id":"","url":"https://api.github.com/users/bitpshr","html_url":"https://github.com/bitpshr","followers_url":"https://api.github.com/users/bitpshr/followers","following_url":"https://api.github.com/users/bitpshr/following{/other_user}","gists_url":"https://api.github.com/users/bitpshr/gists{/gist_id}","starred_url":"https://api.github.com/users/bitpshr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitpshr/subscriptions","organizations_url":"https://api.github.com/users/bitpshr/orgs","repos_url":"https://api.github.com/users/bitpshr/repos","events_url":"https://api.github.com/users/bitpshr/events{/privacy}","received_events_url":"https://api.github.com/users/bitpshr/received_events","type":"User","site_admin":false},"labels":[{"id":573693206,"node_id":"MDU6TGFiZWw1NzM2OTMyMDY=","url":"https://api.github.com/repos/MetaMask/metamask-extension/labels/T12-DONOTMERGE","name":"T12-DONOTMERGE","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":37,"created_at":"2018-07-02T03:09:48Z","updated_at":"2018-10-04T15:15:21Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/MetaMask/metamask-extension/pulls/4703","html_url":"https://github.com/MetaMask/metamask-extension/pull/4703","diff_url":"https://github.com/MetaMask/metamask-extension/pull/4703.diff","patch_url":"https://github.com/MetaMask/metamask-extension/pull/4703.patch"},"body":"This pull request includes a fully-updated [EIP-1102](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1102.md) implementation:\r\n\r\n- Provider is exposed at `window.ethereum`\r\n- Provider is populated with no accounts by default\r\n- Provider exposes Promise-returning `enable` method\r\n- Calling `enable` shows user approval UI\r\n- User approval resolves Promise and populates provider with accounts\r\n- User reject rejects Promise with error message\r\n- Dapps that have not updated can be force-injected via MetaMask settings\r\n\r\n**Note:** This pull request depends on MetaMask/eth-json-rpc-middleware#5.\r\n\r\n## Required next steps\r\n\r\n- [x] Decide on rollout date **(11/02)**\r\n- [x] Publish blog post **(https://goo.gl/PCvxuY)**\r\n- [x] Update web3 deprecation message **(MetaMask/metamask-extension#5353)**\r\n- [x] Release transitionary API **(MetaMask/metamask-extension#5256)**\r\n- [x] Add failsafe settings option **(bec35448125aee7649c1e7b720058f55155a2876)**\r\n- [ ] Release new FAQ documentation\r\n- [ ] Release changes\r\n\r\n## Example detection code\r\n\r\nhttps://gist.github.com/bitpshr/076b164843f0414077164fe7fe3278d9\r\n\r\n## Blog post\r\n\r\nhttps://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8\r\n\r\n## Examples\r\n\r\n### Cached domain approval\r\n\r\n![preview](https://i.gyazo.com/824693c63a6fc8ac8fe636ae5918cc76.gif)\r\n\r\n### User-force injection\r\n\r\n![preview](https://i.gyazo.com/05b5867eedd588470412424c349accc2.gif)\r\n\r\nResolves #3930 \r\nRefs #714"},"comment":{"url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/comments/427058000","html_url":"https://github.com/MetaMask/metamask-extension/pull/4703#issuecomment-427058000","issue_url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/4703","id":427058000,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzA1ODAwMA==","user":{"login":"bitpshr","id":334586,"node_id":"MDQ6VXNlcjMzNDU4Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/334586?v=4","gravatar_id":"","url":"https://api.github.com/users/bitpshr","html_url":"https://github.com/bitpshr","followers_url":"https://api.github.com/users/bitpshr/followers","following_url":"https://api.github.com/users/bitpshr/following{/other_user}","gists_url":"https://api.github.com/users/bitpshr/gists{/gist_id}","starred_url":"https://api.github.com/users/bitpshr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitpshr/subscriptions","organizations_url":"https://api.github.com/users/bitpshr/orgs","repos_url":"https://api.github.com/users/bitpshr/repos","events_url":"https://api.github.com/users/bitpshr/events{/privacy}","received_events_url":"https://api.github.com/users/bitpshr/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T15:15:21Z","updated_at":"2018-10-04T15:15:21Z","author_association":"MEMBER","body":"Hi @paulbarclay, thanks for your feedback. The UX scenario you describe is interesting and valid: some dapps may want to determine if a domain is fully-enabled without relying on `provider#enable` (and thus showing an approval dialog.) To make this possible, a new method was added at `provider#isEnabled` that returns a Promise resolving to a boolean indicating approval status of the current domain.\r\n\r\n**A word of caution:** caching prior user approval and exposing convenience methods like `isEnabled` is MetaMask-specific functionality; there's no guarantee other dapp browsers will implement anything beyond the `provider#enable` since that's all that's currently defined in the underlying EIP. Because of this, the most universally-compatible flow would be to always call `provider#enable`. Still, the `provider#isEnabled` method should now provide this desired functionality.\r\n\r\nThanks again, and please let us know if you have any other issues or concerns while testing the branch."}}
{"actor":{"display_login":"bitpshr"}}