Skip to content

Commit

Permalink
feat: bsc chain name (#768)
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Barbieri <1247834+brunobar79@users.noreply.github.com>
  • Loading branch information
DanielSinclair and brunobar79 authored Jul 25, 2023
1 parent 769ec2a commit 289dbca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/languages/_english.json
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@
"polygon_title": "What's Polygon?",
"polygon_description_1": "Polygon is a sidechain, a distinct network that runs alongside Ethereum and is compatible with it.",
"polygon_description_2": "It allows for cheaper and faster transactions, but unlike Layer 2 networks, Polygon has its own security and consensus mechanisms that differ from Ethereum.",
"bsc_title": "What's Binance Chain?",
"bsc_title": "What's BSC?",
"bsc_description_1": "Binance Smart Chain, or BSC for short, is the blockchain network for the trading platform Binance.",
"bsc_description_2": "It allows for cheaper and faster transactions, but unlike Layer 2 networks, BSC has its own security and consensus mechanisms that differ from Ethereum.",
"link_button_label": "Read more"
Expand Down
2 changes: 1 addition & 1 deletion src/core/types/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export enum ChainId {

export const ChainNameDisplay = {
[ChainId.arbitrum]: 'Arbitrum',
[ChainId.bsc]: 'Binance Chain',
[ChainId.bsc]: 'BSC',
[ChainId.optimism]: 'Optimism',
[ChainId.polygon]: 'Polygon',
[ChainId.mainnet]: 'Ethereum',
Expand Down
6 changes: 3 additions & 3 deletions src/core/utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import { arbitrum, bsc, mainnet, optimism, polygon } from '@wagmi/chains';
import type { Address, Chain } from 'wagmi';

import { ETH_ADDRESS, NATIVE_ASSETS_PER_CHAIN } from '~/core/references';
import { ChainId, ChainName } from '~/core/types/chains';
import { ChainId, ChainName, ChainNameDisplay } from '~/core/types/chains';

import { isLowerCaseMatch } from './strings';

export const SUPPORTED_CHAINS: Chain[] = [
mainnet,
polygon,
optimism,
{ ...arbitrum, name: 'Arbitrum' },
arbitrum,
bsc,
];
].map((chain) => ({ ...chain, name: ChainNameDisplay[chain.id] }));

/**
* @desc Checks if the given chain is a Layer 2.
Expand Down

0 comments on commit 289dbca

Please sign in to comment.