Skip to content

Add name and icon to WalletInfo for richer wallet objects #4

@satoshai-dev

Description

@satoshai-dev

Summary

Enrich the WalletInfo type returned by useWallets with name and icon properties so consumers can build wallet selection UIs without hardcoding wallet metadata.

Motivation

wagmi connectors expose name, icon, and type on each connector object. Our WalletInfo currently only has { id, available }, forcing consumers to maintain their own mapping of wallet IDs to display names and icons.

Proposed API

interface WalletInfo {
    id: SupportedStacksWallet;
    name: string;        // e.g. "Xverse", "Leather", "OKX Wallet"
    icon: string;        // URL or data URI for the wallet icon
    available: boolean;
}

const { wallets } = useWallets();
// [{ id: 'xverse', name: 'Xverse', icon: '...', available: true }, ...]

Context

Identified during API comparison with wagmi in PR #2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions