Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement AccountSelector component #2810

Open
FrederikBolding opened this issue Oct 8, 2024 · 1 comment
Open

Implement AccountSelector component #2810

FrederikBolding opened this issue Oct 8, 2024 · 1 comment
Assignees

Comments

@FrederikBolding
Copy link
Member

FrederikBolding commented Oct 8, 2024

Blocked by lack of chain IDs in the AccountsController state.

We should introduce a component that lets a Snap select from the accounts that the user has without exposing all of the accounts to the Snap.

State
The selected account should be reflected in state with an object containing:

  • addresses: CAIP10Address[]
  • accountId: string (only if the Snap owns the account)

Props

  • hideExternalAccounts?: boolean (should hide non-owned accounts)
  • chainIds?: CAIP2ChainId[]
  • switchSelectedAccount?: boolean (should switch the globally selected network)
  • selectedAccountId?: string
  • selectedAddress?: CAIP10Address

Figma link: TBD

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

No branches or pull requests

3 participants