Skip to content

Reduce default currency list #1269

@benjlevesque

Description

@benjlevesque

Context

As seen in #1268, the default currency manager is pretty heavy.

Originally, the RequestNetwork library knew about all currencies it could support, but since the introduction of CurrencyManager, it's highly configurable, and the expected usage is to specify the list of tokens.

Proposal

Remove most currencies from the default currency list, especially Metamask's default list.

I suggest we keep:

  • native tokens for all supported chains (although this should actually also be dynamic, based on an injected list of supported chains)
  • iso4217 currencies (need to confirm this is fast to load, but I think it should be)
  • a few mainstream ERC20 tokens for convenience

Compatibility

For compatibility, we could offer an async method loadExtendedCurrencyList to fetch the Metamask list, as well as currently hard-coded tokens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    🎫 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions