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

[bug] Custom chain name is overriden by default chain config #2172

Closed
1 task done
ilzheev opened this issue Sep 2, 2024 · 3 comments
Closed
1 task done

[bug] Custom chain name is overriden by default chain config #2172

ilzheev opened this issue Sep 2, 2024 · 3 comments

Comments

@ilzheev
Copy link

ilzheev commented Sep 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

2.1.0

wagmi Version

2.9.0

Current Behavior

Init BNB Chain with custom chain config

  {
    id: 56,
    name: 'BNB Chain',
    iconBackground: '#fff',
    nativeCurrency: {
      decimals: 18,
      name: 'BNB Chain',
      symbol: 'BNB',
    },
    rpcUrls: {
      public: { http: ['https://rpc.ankr.com/bsc'] },
      default: { http: ['https://rpc.ankr.com/bsc'] },
    },
    blockExplorers: {
      default: { name: 'BscScan', url: 'https://bscscan.com' },
    }
  }

Chain with this config is displayed in Rainbowkit, but the name is overriden to BSC:
image

Expected Behavior

Chain name should be as set in custom config – BNB Chain

Steps To Reproduce

  • Init custom chain with following config:
  {
    id: 56,
    name: 'BNB Chain',
    iconBackground: '#fff',
    nativeCurrency: {
      decimals: 18,
      name: 'BNB Chain',
      symbol: 'BNB',
    },
    rpcUrls: {
      public: { http: ['https://rpc.ankr.com/bsc'] },
      default: { http: ['https://rpc.ankr.com/bsc'] },
    },
    blockExplorers: {
      default: { name: 'BscScan', url: 'https://bscscan.com' },
    }
  }
  • do NOT include standard BSC chain config in Rainbowkit init

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

@DanielSinclair
Copy link
Collaborator

@ilzheev This is currently expected. We use colloquial names (i.e. Arbitrum vs Arbitrum One) for a handful of chains. Do you think BNB is incorrect in this context?

@DanielSinclair DanielSinclair closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2024
@ilzheev
Copy link
Author

ilzheev commented Sep 5, 2024

@DanielSinclair When we initially deployed, BNB Chain team asked us to rename BSC / Binance Smart Chain to BNB Chain in our UI – I assume they don't want to be associated with Binance anymore and try to stick to BNB Chain name.

If the requirement is to use colloquial names only, I am not sure if BNB is better than BSC.

Ideal solution, in my opinion, is to allow developers to override name parameter using custom chains – especially considering that iconBackground & iconUrl are allowed to be overridden using custom chain config. Not sure why name override does not work in the same config struct.

@jTerraBit
Copy link

@DanielSinclair @ilzheev We are also experiencing this issue and need to set the name to BNB Chain

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