ubiquity / pay.ubq.fi

Generate and claim spender permits (EIP-2612)
https://pay.ubq.fi
8 stars 36 forks source link

hot-fix: use `window.ethereum` #213

Closed Keyrxng closed 6 months ago

Keyrxng commented 6 months ago

Resolves https://github.com/ubiquity/pay.ubq.fi/pull/212#issuecomment-2024419599

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 commented 6 months ago

@pavlovcik @gentlementlegen

I believe this was a matter of urgency?

ubiquity-os-deployer[bot] commented 6 months ago
94b8ca9
aea724e
Keyrxng commented 6 months ago

further QA:

That battery percentage tho

image

gentlementlegen commented 6 months ago

Tested on:

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 commented 6 months ago

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.

gentlementlegen commented 6 months ago

@pavlovcik You called it here https://github.com/ubiquity/pay.ubq.fi/pull/209#discussion_r1536983367 😅