Closed EdouardBougon closed 1 month ago
Attention: Patch coverage is 92.30769%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 78.05%. Comparing base (
9866480
) to head (0714d59
). Report is 4 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
packages/sdk/src/utils/get-browser-extension.ts | 92.30% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
I’ve discovered an issue with the SDK (pure JavaScript and wagmi). The SDK tests the boolean
window.ethereum.isMetaMask
to detect if the extension is installed. However, some other extensions use the same boolean to imitate MetaMask (e.g., Uniswap, Zerion, Rabby, etc.), and it works…So, if the MetaMask extension is not installed, but one of those wallets is, the SDK will open the “fake” extension instead of the connection modal. Wagmi has a similar detection on their side, but they don’t take into account the “Uniswap Wallet.”
I also created a PR on Wagmi to add Uniswap to their detection test.
Here’s a demo video.
https://github.com/user-attachments/assets/be461d80-436b-475c-9fd5-9c692b9010bd