Skip to content

Implement AccountSelector component #2810

@FrederikBolding

Description

@FrederikBolding

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)
  • selectedAddress?: CAIP10Address

Metadata

Metadata

Labels

release-12.21.0Issue or pull request that will be included in release 12.21.0snaps-featureSnaps feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions