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

sapphire-viem-v2: Brave browser default wallet selection unable to override window.ethereum #386

Closed
aefhm opened this issue Sep 10, 2024 · 2 comments
Assignees
Labels
bug client javascript Pull requests that update JavaScript code p:1 Priority: high

Comments

@aefhm
Copy link
Contributor

aefhm commented Sep 10, 2024

SUMMARY

Our Viem integration package has usability issue with selection of default Brave wallet.

ISSUE TYPE
  • Bug Report
STEPS TO REPRODUCE

Select Brave wallet as default Brave browser. Navigate to application using sapphire-viem-v2.

ACTUAL RESULTS
Uncaught TypeError: Cannot assign to read only property 'ethereum' of object '#<Window>'
    at o (inpage.js:1:31269)
    at r.initializeProvider (inpage.js:1:31747)
    at Object.<anonymous> (inpage.js:1:1116)
    at Object.<anonymous> (inpage.js:1:5585)
    at 1.../../shared/modules/provider-injection (inpage.js:1:5598)
    at i (inpage.js:1:254)
    at e (inpage.js:1:414)
    at inpage.js:1:431

Note this is similar to this old bug, but this Brave wallet issue explains that Brave does not want their window.ethereum provider to be overriden.

EXPECTED RESULTS

Brave user should not be blocked.

@aefhm aefhm added this to the integrations-viem-2.0.1 milestone Sep 10, 2024
@aefhm aefhm added p:1 Priority: high client javascript Pull requests that update JavaScript code bug labels Sep 10, 2024
@CedarMist
Copy link
Contributor

Where are we overriding window.ethereum ?

@aefhm
Copy link
Contributor Author

aefhm commented Sep 24, 2024

Where are we overriding window.ethereum ?

Correction. We are not. MetaMask is because they like to override things.

This is also not a breaking usability issue because only console developers would see an error. Only #385 was blocking the wallet from loading correctly.

I don't think we need to do anything here.

@aefhm aefhm closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug client javascript Pull requests that update JavaScript code p:1 Priority: high
Projects
None yet
Development

No branches or pull requests

2 participants