Skip to content

feat: pass wallet setup to providers when building them - #1556

Open
Ikari-Shinji-re wants to merge 1 commit into
refactor/widget-drop-legacy-providersfrom
feat/wallets-setup-on-providers
Open

Ikari-Shinji-re wants to merge 1 commit into
refactor/widget-drop-legacy-providersfrom
feat/wallets-setup-on-providers

Conversation

@Ikari-Shinji-re

Copy link
Copy Markdown
Member

Summary

Third step of moving wallet provider setup out of the widget.

Wallets that need setup (WalletConnect, TON Connect, Trezor, Ledger Wallet, OKX) used to get it from the widget, which mapped its own config fields onto hardcoded wallet ids at hub.init. Now each provider takes its setup when it's built, so a provider is fully set up by whoever creates it.

  • Providers: buildProvider(options) takes the setup. It's required for WalletConnect, TON Connect, Trezor and Ledger Wallet, and optional for OKX. WalletConnect still gets the blockchain meta at init.
  • provider-all: allProviders(options) takes { walletConnect, tonConnect, trezor, ledgerWallet, okx } and leaves out wallets whose setup is missing. OKX falls back to tonConnect.
  • wallets-react:
    • configs.walletOptions is removed.
    • Every provider gets { meta } at init, so no wallet ids are involved.
    • Each provider is initialized on its own, so one that throws no longer stops the others.
  • Widget: builds its providers with its config fields as setup and no longer maps options by wallet id. The config fields themselves are unchanged.
  • Playground and queue-manager demo: build providers with their setup.

Breaking: the five providers' buildProvider now take their setup, and wallets-react's configs.walletOptions is removed. The widget's config is unchanged.

Fixes # (issue)

How did you test this change?

  • Lint and build pass for the changed providers, provider-all, wallets-react and widget-embedded
  • Unit tests pass for wallets-react (12) and widget-embedded (86)
  • Playground, widget app, iframe and queue-manager demo type-check (no new errors)
  • Manual: WalletConnect, TON Connect and Trezor show up and connect in the widget app and playground

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
playground-preview — c222a024 Deployed Nov 16, 2026 by Ikari-Shinji-re via playground-preview #5585
app-preview — c222a024 Deployed Nov 16, 2026 by Ikari-Shinji-re via app-preview #5585
preview — c222a024 Deployed Nov 16, 2026 by Ikari-Shinji-re via deploy #5585
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.

2 participants