From ee032ff4db75e5a8cec2aae99185dc394f37e77b Mon Sep 17 00:00:00 2001 From: evilpeach Date: Wed, 5 May 2021 10:12:29 +0700 Subject: [PATCH] add laozi chain id --- scan/src/components/ChainIDBadge.re | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scan/src/components/ChainIDBadge.re b/scan/src/components/ChainIDBadge.re index 804826f619..858b23000c 100644 --- a/scan/src/components/ChainIDBadge.re +++ b/scan/src/components/ChainIDBadge.re @@ -69,6 +69,8 @@ type chainID = | GuanYuTestnet | GuanYuPOA | GuanYuMainnet + | LaoziTestnet + | LaoziMainnet | Unknown; let parseChainID = @@ -82,9 +84,13 @@ let parseChainID = | "bandchain" => GuanYuDevnet | "band-guanyu-testnet1" | "band-guanyu-testnet2" - | "band-guanyu-testnet3" => GuanYuTestnet + | "band-guanyu-testnet3" + | "band-guanyu-testnet4" => GuanYuTestnet | "band-guanyu-poa" => GuanYuPOA | "band-guanyu-mainnet" => GuanYuMainnet + | "band-laozi-testnet1" + | "band-laozi-testnet2" => LaoziTestnet + | "band-laozi-mainnet" => LaoziMainnet | _ => Unknown; let getLink = @@ -93,8 +99,10 @@ let getLink = | WenchangMainnet | GuanYuMainnet => "https://cosmoscan.io/" | GuanYuDevnet => "https://guanyu-devnet.cosmoscan.io/" - | GuanYuTestnet => "https://guanyu-testnet3.cosmoscan.io/" + | GuanYuTestnet => "https://guanyu-testnet4.cosmoscan.io/" | GuanYuPOA => "https://guanyu-poa.cosmoscan.io/" + | LaoziTestnet => "https://laozi-testnet.cosmoscan.io/" + | LaoziMainnet | Unknown => ""; let getName = @@ -105,6 +113,8 @@ let getName = | GuanYuTestnet => "guanyu-testnet" | GuanYuPOA => "guanyu-poa" | GuanYuMainnet => "guanyu-mainnet" + | LaoziTestnet => "laozi-testnet" + | LaoziMainnet => "laozi-mainnet" | Unknown => "unknown"; [@react.component] @@ -132,7 +142,7 @@ let make = () =>
- {[|GuanYuMainnet, GuanYuTestnet, GuanYuPOA|] + {[|GuanYuMainnet, GuanYuTestnet|] ->Belt.Array.keep(chainID => chainID != currentChainID) ->Belt.Array.map(chainID => { let name = chainID->getName;