Skip to content

feat: require wallet providers from the host app - #1555

Open
Ikari-Shinji-re wants to merge 2 commits into
feat/playground-wallet-providersfrom
feat/widget-wallets-as-providers-required
Open

Ikari-Shinji-re wants to merge 2 commits into
feat/playground-wallet-providersfrom
feat/widget-wallets-as-providers-required

Conversation

@Ikari-Shinji-re

@Ikari-Shinji-re Ikari-Shinji-re commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Last step of moving wallet provider setup out of the widget Breaking.

config.wallets is now a required list of hub Providers created by the host app, already set up with whatever each wallet needs. The widget still connects and manages them with wallets-react, and no longer knows about any specific wallet's setup.

  • Config:
    • wallets: Provider[] is required; DEFAULT_CONFIG has wallets: [].
    • walletConnectProjectId, trezorManifest, tonConnect, ledgerWallet and __UNSTABLE_OR_INTERNAL__.walletConnectListedDesktopWalletLink are removed, along with their types. Their setup is now passed to the providers when they're built (e.g. allProviders({ walletConnect, trezor, tonConnect, ledgerWallet })).
  • Removed provider building: the config store's provider list, utils/providers.ts and hooks/useWalletProviders/.
  • Wallets container: reads the providers from the widget store, the same source as the wallet list. Otherwise, narrowing the wallet list could make the list ask for a wallet the engine had already dropped, and crash. It also resets connected wallets when the providers change.
  • Wallet list: lists config.wallets.
  • Dependencies: removes @rango-dev/provider-all and the 10 hub3js packages the widget never imports. @hub3js/core and @hub3js/namespaces stay (types); @rango-dev/wallets-react stays (the wallet engine).
  • Widget app and iframe: their config types take wallet ids and keep the wallet setup fields under the same names, so iframe integrators don't change anything. The widget app turns them into providers and strips them from the config it passes to the widget.
  • Playground: its config type keeps the wallet setup fields it uses.

app-v2 already passes providers, but it will need to build them with their setup and drop the removed fields from its Redux widget config.

Fixes # (issue)

How did you test this change?

  • widget-embedded: lint, type-check and build pass
  • widget-embedded unit tests pass (86)
  • Widget app, playground and iframe: lint and type-check pass
  • Widget app, playground and iframe: production build passes
  • Manual: in the playground, narrow the wallet list (e.g. only MetaMask) and connect a wallet
  • Manual: widget app loaded through the iframe with walletConnectProjectId; WalletConnect shows up and connects

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Implemented a user interface (UI) change, referencing our Figma design to ensure pixel-perfect precision.

This branch was successfully deployed

3 active deployments
app-preview — ec820fef Deployed Nov 16, 2026 by Ikari-Shinji-re via app-preview #5588
playground-preview — ec820fef Deployed Nov 16, 2026 by Ikari-Shinji-re via playground-preview #5588
preview — ec820fef Deployed Nov 16, 2026 by Ikari-Shinji-re via deploy #5588
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