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

Make dapp detection accurate #6491

Closed
tmcw opened this issue Oct 16, 2019 · 5 comments
Closed

Make dapp detection accurate #6491

tmcw opened this issue Oct 16, 2019 · 5 comments
Assignees

Comments

@tmcw
Copy link

tmcw commented Oct 16, 2019

Description

Detecting 'Installing a Crypto Wallet' by using a getter on window.web3 is inaccurate and misleading to users. For sites like ours, we want to keep track of globals, and something as simple as

Object.getOwnPropertyNames(window).forEach(key => window[key])

Triggers this message, which recurs even if a user clicks 'Deny'. It's a product that has nothing to do with crypto and this message is incorrect at least and a problem for user trust.

You could:

  • Make the property non-enumerable
  • Drop this check

Or something else. For now we'll have to hardcode a workaround into our app to make it avoid web3.

Steps to Reproduce

  1. Object.getOwnPropertyNames(window).forEach(key => window[key])

Actual result:

A dapp is detected.

Expected result:

A dapp is not detected.

Reproduces how often:

Always

Brave version (brave://version info)

All

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No
  • Does the issue resolve itself when disabling Brave Rewards? No
  • Is the issue reproducible on the latest version of Chrome? No

Pulled from #718

@srirambv srirambv added feature/web3/wallet Integrating Ethereum+ wallet support needs-discussion Although the issue is clear, we haven't yet reached a decision about the right solution. labels Oct 16, 2019
@srirambv
Copy link
Contributor

cc: @bbondy @tomlowenthal

@tildelowengrimm tildelowengrimm added the priority/P4 Planned work. We expect to get to it "soon". label Oct 16, 2019
@bbondy
Copy link
Member

bbondy commented Dec 20, 2019

@tmcw I think this is no longer an issue, can you confirm?

@tmcw
Copy link
Author

tmcw commented Dec 20, 2019

I can confirm that it is still an issue, still replicable with the one-line trigger. https://gainful-beechnut.glitch.me/

@wighawag
Copy link

I would like to add that even for dapp, no popup should be triggered just by accessing window.ethereum. This is not user friendly

Brave should follow https://eips.ethereum.org/EIPS/eip-1102

"window.ethereum existence" check is useful to check if a user browser can support dapp.

@ryanml ryanml self-assigned this Dec 3, 2020
@ryanml ryanml added QA/No release-notes/exclude and removed needs-discussion Although the issue is clear, we haven't yet reached a decision about the right solution. labels Dec 3, 2020
@ryanml ryanml added closed/wontfix and removed QA/No feature/web3/wallet Integrating Ethereum+ wallet support priority/P4 Planned work. We expect to get to it "soon". release-notes/exclude labels Dec 7, 2020
@ryanml
Copy link
Contributor

ryanml commented Dec 7, 2020

We are going to be removing the dapp infobar for the time being, so closing this for now. ref: We are going to be removing the dapp infobar for the time being, so closing this for now, but in future iterations this will be top priority for the feature, thanks! ref: brave/brave-core#7321

@ryanml ryanml closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants