Skip to content

[Bug]: Handle case desensitive chain ids and Optimism testnet #1061

@Adamj1232

Description

@Adamj1232

Current Behavior

For Optimism an icon isn't displayed for chain Id 0xA but is for 0xa
Onboard needs to handle for case insensitive chain id (i.e. coerce to lowercase)
Display Optimism icon for Optimism testnet 0x45

Expected Behavior

Coerce chain Id to lowercase
Display Optimism icon for Optimism testnet 0x45

Steps To Reproduce

Use below within chains initi array

      {
      id: '0xA',
      token: 'ETH',
      label: 'Optimism Mainnet',
      rpcUrl: 'https://mainnet.optimism.io',
    },
    {
      id: '0x45',
      token: 'ETH',
      label: 'Optimism Testnet',
      rpcUrl: TESTNET_RPC_URL,
    },

Onboard Version

latest

Node Version

16.3.2

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions