Skip to content

Commit

Permalink
Merge pull request #155 from bandprotocol/feat/chain-id-v3
Browse files Browse the repository at this point in the history
add band v3 chain selector
  • Loading branch information
babybunn authored Jan 24, 2025
2 parents dd90c1e + 5c9ae9f commit 4c72234
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/layout/ChainIDBadge.res
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type chainID =
| LaoziTestnet
| LaoziMainnet
| LaoziPOA
| V3Testnet
| Unknown

let parseChainID = x =>
Expand Down Expand Up @@ -82,6 +83,8 @@ let parseChainID = x =>
LaoziTestnet
| "laozi-mainnet" => LaoziMainnet
| "band-laozi-poa" => LaoziPOA
| "band-v3-testnet-1" => V3Testnet

| _ => Unknown
}

Expand All @@ -96,6 +99,7 @@ let getLink = x =>
| LaoziTestnet => "https://laozi-testnet6.cosmoscan.io/"
| LaoziMainnet => "https://cosmoscan.io/"
| LaoziPOA => "https://laozi-poa.cosmoscan.io/"
| V3Testnet => "https://band-v3-testnet.cosmoscan.io/"
| Unknown => ""
}

Expand All @@ -110,6 +114,7 @@ let getName = x =>
| LaoziTestnet => "laozi-testnet"
| LaoziMainnet => "laozi-mainnet"
| LaoziPOA => "laozi-poa"
| V3Testnet => "v3-testnet"
| Unknown => "unknown"
}

Expand Down Expand Up @@ -140,7 +145,7 @@ let make = () => {
? <Icon name="far fa-angle-up" color={theme.neutral_600} />
: <Icon name="far fa-angle-down" color={theme.neutral_600} />}
<div className={Styles.dropdown(show, theme)}>
{[LaoziMainnet, LaoziTestnet]
{[LaoziMainnet, LaoziTestnet, V3Testnet]
->Belt.Array.keep(chainID => chainID != currentChainID)
->Belt.Array.map(chainID => {
let name = chainID->getName
Expand Down

0 comments on commit 4c72234

Please sign in to comment.