Skip to content

feat: add allow, deny, featured lists for wallet discovery#39

Merged
stevesarmiento merged 3 commits intomainfrom
wallet-filters
Jan 14, 2026
Merged

feat: add allow, deny, featured lists for wallet discovery#39
stevesarmiento merged 3 commits intomainfrom
wallet-filters

Conversation

@stevesarmiento
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 14, 2026

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

Project Deployment Review Updated (UTC)
connectorkit-playground Ready Ready Preview, Comment Jan 14, 2026 7:43am

@github-actions
Copy link
Copy Markdown

📊 Coverage Report

ConnectorKit Packages Test Results

Coverage reports have been generated for all packages.

📁 View Coverage Artifacts

Coverage reports have been generated for all packages:

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Jan 14, 2026

Greptile Summary

Adds wallet filtering and prioritization controls to the Wallet Standard auto-discovery system. Developers can now configure allowList (show only these wallets), denyList (hide these wallets), and featured (prioritize these wallets at the top) via the wallets config option.

Key Changes:

  • Added WalletDisplayConfig interface with allowList, denyList, and featured string arrays
  • Implemented applyWalletDisplayConfig() function in detector.ts with case-insensitive matching and proper priority rules (deny > allow > featured)
  • Schema validation with nonEmptyTrimmedStringSchema ensures wallet names are trimmed and non-empty
  • Applied filtering in both initialize() and refreshWallets() flows for consistency
  • Comprehensive test coverage including edge cases (case-insensitivity, priority conflicts, empty lists)
  • Updated README with clear examples and explanations
  • Version bumped to 0.2.3

Implementation Quality:

  • Clean separation of concerns with filtering logic isolated in applyWalletDisplayConfig()
  • Proper normalization with normalizeWalletName() for case-insensitive matching
  • Defensive programming with optional chaining and fallback arrays
  • Full-scope filtering that affects both connectors and legacy wallets arrays

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Well-designed feature with thorough test coverage, clear documentation, proper type safety, and no breaking changes. The filtering logic is simple and defensive, with appropriate validation at the schema level.
  • No files require special attention

Important Files Changed

Filename Overview
packages/connector/src/types/connector.ts Added WalletDisplayConfig interface with allowList, denyList, and featured properties; integrated into ConnectorConfig
packages/connector/src/config/schemas.ts Added walletDisplayConfigSchema with nonEmptyTrimmedStringSchema validation; integrated into config validation
packages/connector/src/lib/wallet/detector.ts Core implementation of wallet filtering logic with normalizeWalletName and applyWalletDisplayConfig functions; applied in initialize() and refreshWallets()
packages/connector/src/lib/core/connector-client.ts Added call to setWalletDisplayConfig before detector initialization

Sequence Diagram

sequenceDiagram
    participant User
    participant ConnectorClient
    participant WalletDetector
    participant WalletStandardRegistry
    participant Config

    User->>ConnectorClient: initialize(config)
    ConnectorClient->>Config: wallets: { allowList, denyList, featured }
    
    ConnectorClient->>WalletDetector: setAdditionalWallets(additionalWallets)
    ConnectorClient->>WalletDetector: setWalletDisplayConfig(config.wallets)
    
    ConnectorClient->>WalletDetector: initialize()
    
    WalletDetector->>WalletStandardRegistry: get()
    WalletStandardRegistry-->>WalletDetector: [all registered wallets]
    
    WalletDetector->>WalletDetector: filter(isSolanaWallet)
    WalletDetector->>WalletDetector: deduplicateWallets()
    
    WalletDetector->>WalletDetector: applyWalletDisplayConfig()
    Note over WalletDetector: 1. Normalize wallet names (trim, lowercase)<br/>2. Apply denyList filter<br/>3. Apply allowList filter (if provided)<br/>4. Apply featured ordering
    
    WalletDetector->>WalletDetector: updateConnectorRegistry(filtered)
    WalletDetector->>ConnectorClient: updateState({ connectors, wallets })
    
    ConnectorClient-->>User: initialized with filtered wallets
    
    WalletStandardRegistry->>WalletDetector: on('register', newWallet)
    WalletDetector->>WalletDetector: applyWalletDisplayConfig()
    WalletDetector->>ConnectorClient: updateState()
Loading

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Jan 14, 2026

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

@stevesarmiento stevesarmiento merged commit bf101db into main Jan 14, 2026
5 checks passed
@AlphaR2
Copy link
Copy Markdown

AlphaR2 commented Jan 14, 2026

Amazing work @stevesarmiento. I'll surely test this out and happy to contribute more to make Connector Kit better

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