Skip to content

Fix wallet connection: working providers only, and reads without a wallet - #473

Merged
okwme merged 1 commit into
masterfrom
fix/wallet-providers
Sep 3, 2026
Merged

okwme merged 1 commit into
masterfrom
fix/wallet-providers

Conversation

@okwme

@okwme okwme commented Sep 2, 2026

Copy link
Copy Markdown
Member

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's feature/vue-upgrade-appkit.

Side effects

before after
advisories 1131 1053
critical 134 126
bundle files 122 112

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.

…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
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Preview: https://pr-473.clovers-dapp.pages.dev

Built from 0abeece2d0395e247132822ba8b4df9094156521. A Pages
preview deployment — it has its own url and does not touch what
clovers.network is serving.

Note it talks to the production API at api.clovers.network,
because there is only one. Fine for reading; be deliberate about
anything that writes.

@okwme
okwme merged commit 4cc250d into master Sep 3, 2026
5 checks passed
@okwme
okwme deleted the fix/wallet-providers branch September 3, 2026 06:51
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.

1 participant