Repository navigation
Fix wallet connection: working providers only, and reads without a wallet - #473
Merged
Merged
Conversation
…llet
Two problems, one of them worse than the modal.
A visitor with no wallet extension fell through to Portis as the read
provider:
} else {
const portis = new Portis(...)
global.web3 = new Web3(portis.provider)
}
widget.portis.io is NXDOMAIN, so global.web3 -- and the ENS instance built from
it on the next line -- were backed by a provider that could never connect.
Clover data comes from the API and kept working, which is why this was not
obvious, but every chain read for a visitor without a wallet failed silently.
That fallback is now a plain public RPC, so reads work for everyone and
connecting a wallet still replaces the provider as before.
The modal offered four choices of which three were dead ends rather than merely
deprecated: WalletConnect v1's bridge and Portis are both NXDOMAIN, Fortmatic's
API answers 404. A user picking one got a hang with no way to tell whether the
fault was theirs. Injected wallets are the only working option, so that is what
is offered.
The three packages are removed as well, since nothing imports them now. That
takes the advisory count from 1131 to 1053, 134 critical to 126, and ten files
off the build. The residual mentions of those names in the bundle are
web3modal's own provider registry, not the SDKs.
No key and no account needed for any of this. Restoring WalletConnect properly
means v2, which requires a Reown projectId; that work is on
feature/vue-upgrade-appkit.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HQRbhtyPMspAXjPK2uoGaQ
|
Preview: https://pr-473.clovers-dapp.pages.dev Built from Note it talks to the production API at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two problems
1. Reads were broken for visitors without a wallet extension. The fallback read provider was Portis, whose widget host is NXDOMAIN. So
global.web3— and the ENS instance built from it — could never connect. Clover data comes from the API and kept working, which is why it wasn't obvious, but every chain read silently failed for those visitors. Now falls back to a public RPC.2. The modal offered three dead providers. WalletConnect v1's bridge and Portis are NXDOMAIN; Fortmatic's API 404s. Picking one hangs with no error. Injected wallets are the only working path, so that's what's offered now.
No key, no account
Everything here is removal plus a public RPC. Restoring WalletConnect properly needs v2 and a Reown
projectId— that'sfeature/vue-upgrade-appkit.Side effects
Residual mentions of those provider names in the bundle are web3modal's own registry, not the SDKs.
Check the preview
This is the first PR on this repo with a preview build — the comment below has the URL. Worth confirming the connect button still works with MetaMask, and that clovers load for a browser with no wallet at all.