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

hot-fix: use window.ethereum #213

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

Keyrxng
Copy link
Member

@Keyrxng Keyrxng commented Mar 28, 2024

Resolves #212 (comment)

    • I'm using Brave on ios here
    • I checked out commits about 4 days apart until it would work on mobile without any code changes then applied the changes to the commit in which they were first introduced and verified it would load on mobile. I verified that development wouldn't load from HEAD on mobile before merging these changes in and verifying that it would load afterwards

If the issue was that on mobile the UI would never finish loading but would work on a desktop then this resolves it, below are some related infos.

An alternative discovery mechanism to window.ethereum for EIP-1193 providers which supports discovering multiple injected Wallet Providers in a web page using Javascript’s window events... Currently, Wallet Provider that offer browser extensions must inject their Ethereum providers (EIP-1193) into the same window object window.ethereum; however, this creates conflicts for users that may install more than one browser extension.

At present, window.ethereum is the prevailing method by which Ethereum-compatible applications interact with injected wallets.

Historically, Providers have been made available as window.ethereum in web browsers, but this convention is not part of the specification.

image

@Keyrxng Keyrxng requested a review from 0x4007 as a code owner March 28, 2024 12:00
@Keyrxng
Copy link
Member Author

Keyrxng commented Mar 28, 2024

@pavlovcik @gentlementlegen

I believe this was a matter of urgency?

@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Mar 28, 2024

@Keyrxng
Copy link
Member Author

Keyrxng commented Mar 28, 2024

further QA:

That battery percentage tho

image

@gentlementlegen
Copy link
Member

gentlementlegen commented Mar 29, 2024

Tested on:

  • Chrome, with and without wallet
  • Opera, with and without wallet
  • Edge, with and without wallet
  • Firefox, with and without wallet
  • Mobile device, with and without wallet

On every test getting a toast saying "Please use a web3 enabled browser to collect this reward." which I believe is the desired behavior, thanks for the fix.

@0x4007
Copy link
Member

0x4007 commented Mar 29, 2024

The crazy part here is that your pull deployed to production. I thought we fixed that a few weeks ago. Not sure if I messed up the settings on Cloudflare when I rolled back last night. Thanks for the fix.

@0x4007 0x4007 merged commit aea724e into ubiquity:development Mar 29, 2024
3 checks passed
@gentlementlegen
Copy link
Member

@pavlovcik You called it here #209 (comment) 😅

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.

3 participants