Skip to content

Conversation

@DanielSinclair
Copy link
Collaborator

@DanielSinclair DanielSinclair commented Oct 15, 2025

PR-Codex overview

This PR primarily focuses on refactoring the wallet connectors in the rainbowkit package, enhancing type safety, and improving the structure of the code for better maintainability. It introduces a new WalletFactory type for wallet creation and modifies several wallet connectors accordingly.

Detailed summary

  • Introduced WalletFactory type for wallet creation.
  • Updated wallet connectors to use satisfies Wallet for type safety.
  • Refactored several wallet connectors to improve code structure.
  • Changed wallet prop in WalletButton to WalletId.
  • Updated AvatarProps to use export type.
  • Added components entry in package.json for better module exports.
  • Modified mapping logic in index.tsx for better readability.
  • Enhanced error handling in build scripts for components.

The following files were skipped due to too many changes: packages/rainbowkit/src/wallets/walletConnectors/paraSwapWallet/paraswapWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/valoraWallet/valoraWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/oktoWallet/oktoWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/omniWallet/omniWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/oneInchWallet/oneInchWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/bestWallet/bestWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/readyWallet/readyWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/bitverseWallet/bitverseWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/talismanWallet/talismanWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/iopayWallet/iopayWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/imTokenWallet/imTokenWallet.ts, packages/rainbowkit/src/wallets/walletConnectors/ledgerWallet/ledgerWallet.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Oct 15, 2025

⚠️ No Changeset found

Latest commit: 1e3e71a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rainbowkit-example Ready Ready Preview Comment Oct 16, 2025 8:50pm
rainbowkit-site Ready Ready Preview Comment Oct 16, 2025 8:50pm

DanielSinclair and others added 2 commits October 16, 2025 16:46
Refactors wallet connectors to use the new WalletFactory helper type,
which preserves literal ID types through 'as const' assertions. This
provides better type safety and enables stricter type checking for
wallet identifiers throughout the codebase.

Changes:
- Add WalletFactory helper type to Wallet.ts
- Add appName and appIcon to CreateWalletFn type for wallets that require them
  (baseAccount, coinbaseWallet, geminiWallet)
- Convert all wallet connectors to use WalletFactory pattern
- Flatten type definitions in baseAccount and coinbaseWallet
- Update WalletButton components to work with new types
- All wallet IDs now use 'as const' for literal type preservation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Adds new component exports and updates the build configuration to support
separate component builds.

Changes:
- Export Avatar component with loading state support
- Export AccountModal and ChainModal components
- Add components/package.json for proper module resolution
- Update build.js to support components build
- Update src/components/index.ts with component re-exports
- Update example to use typed wallet IDs with 'as const'

This enables developers to use RainbowKit UI components individually
in custom wallet connection flows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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