Merge pull request #88 from cosmos/feat/add-testnet-config

Add juno testnet config
This commit is contained in:
Simon Warta 2023-04-12 10:59:15 +02:00 committed by GitHub
commit f5035fe0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 6 deletions

12
.env.test.sample Normal file
View File

@ -0,0 +1,12 @@
FAUNADB_SECRET=
NEXT_PUBLIC_NODE_ADDRESS=https://rpc.uni.junonetwork.io:443
NEXT_PUBLIC_DENOM=ujunox
NEXT_PUBLIC_DISPLAY_DENOM=JUNOX
NEXT_PUBLIC_DISPLAY_DENOM_EXPONENT=6
NEXT_PUBLIC_GAS_PRICE=0.04ujunox
NEXT_PUBLIC_CHAIN_ID=uni-6
NEXT_PUBLIC_ADDRESS_PREFIX=juno
NEXT_PUBLIC_REGISTRY_NAME=junotestnet
NEXT_PUBLIC_EXPLORER_LINK_TX="https://testnet.mintscan.io/juno-testnet/txs/\${txHash}"
NEXT_PUBLIC_CHAIN_DISPLAY_NAME="Juno Testnet"
NEXT_PUBLIC_MULTICHAIN=true

View File

@ -1,14 +1,13 @@
import React, { useEffect, useState } from "react";
import axios from "axios";
import { StargateClient } from "@cosmjs/stargate";
import { assert } from "@cosmjs/utils";
import axios from "axios";
import React, { useEffect, useState } from "react";
import { useAppContext } from "../../context/AppContext";
import GearIcon from "../icons/Gear";
import Button from "../inputs/Button";
import Input from "../inputs/Input";
import { useAppContext } from "../../context/AppContext";
import Select from "../inputs/Select";
import StackableContainer from "../layout/StackableContainer";
import { assert } from "@cosmjs/utils";
import { ChainRegistryAsset } from "./chainregistry";
interface ChainOption {
@ -104,7 +103,11 @@ const ChainSelect = () => {
if (index >= 0) {
return options[index];
}
return { label: "unkown chain", value: -1 };
return {
label:
registryName === process.env.NEXT_PUBLIC_REGISTRY_NAME ? registryName : "unknown chain",
value: -1,
};
};
const getChainInfo = async (chainOption: GithubChainRegistryItem) => {