Move constants out of component
This commit is contained in:
parent
cbc1f7b293
commit
14e7283bdc
@ -37,6 +37,9 @@ interface GithubChainRegistryItem {
|
||||
};
|
||||
}
|
||||
|
||||
const chainsUrl = "https://api.github.com/repos/cosmos/chain-registry/contents";
|
||||
const testnetsUrl = "https://api.github.com/repos/cosmos/chain-registry/contents/testnets";
|
||||
|
||||
const ChainSelect = () => {
|
||||
const { state, dispatch } = useAppContext();
|
||||
|
||||
@ -61,9 +64,6 @@ const ChainSelect = () => {
|
||||
const [tempRegistryName, setRegistryName] = useState(state.chain.registryName);
|
||||
const [tempExplorerLink, setExplorerLink] = useState(state.chain.explorerLink);
|
||||
|
||||
const chainsUrl = "https://api.github.com/repos/cosmos/chain-registry/contents";
|
||||
const testnetsUrl = "https://api.github.com/repos/cosmos/chain-registry/contents/testnets";
|
||||
|
||||
const getGhJson = useCallback(async () => {
|
||||
// getting chain info from this repo: https://github.com/cosmos/chain-registry
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user