Skip to content

Implement AssetSelector component #2811

@FrederikBolding

Description

@FrederikBolding

We should implement a way to let the Snap select from the assets in MetaMask without exposing all of the token details to the Snap.

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

  • asset: CAIP19Identifier
  • name: string
  • ticker: string

Props

  • addresses: CAIP10Address[]
  • chainIds?: CAIP2ChainId[] (Alternative filtering option to passing addresses)
  • selectedAsset?: CAIP19Address

Selectors available here for non-EVM assets:
https://github.com/MetaMask/metamask-extension/blob/103d92c4f6d705e2389f2e723713994e1c035c37/ui/selectors/assets.ts#L13

Sub-issues

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions