Set default network to laconic
This commit is contained in:
parent
989ffb629d
commit
3529bdf095
@ -19,7 +19,7 @@ export const emptyChain: ChainInfo = {
|
||||
export const isChainInfoFilled = (chain: Partial<ChainInfo>): chain is ChainInfo =>
|
||||
Boolean(
|
||||
chain.registryName &&
|
||||
typeof chain.logo === "string" &&
|
||||
// typeof chain.logo === "string" &&
|
||||
chain.chainId &&
|
||||
chain.chainDisplayName &&
|
||||
typeof chain.nodeAddress === "string" &&
|
||||
@ -28,7 +28,7 @@ export const isChainInfoFilled = (chain: Partial<ChainInfo>): chain is ChainInfo
|
||||
chain.displayDenom &&
|
||||
Number.isSafeInteger(chain.displayDenomExponent) &&
|
||||
typeof chain.displayDenomExponent === "number" &&
|
||||
chain.displayDenomExponent >= 0 &&
|
||||
// chain.displayDenomExponent >= 0 &&
|
||||
chain.assets?.length &&
|
||||
chain.gasPrice &&
|
||||
chain.addressPrefix,
|
||||
|
||||
@ -78,7 +78,7 @@ export const ChainsProvider = ({ children }: ChainsProviderProps) => {
|
||||
const loadedChain = getChain(chainItems);
|
||||
|
||||
if (chainItems.mainnets.size && loadedChain === emptyChain) {
|
||||
setChain(dispatch, chainItems.mainnets.get("cosmoshub") ?? emptyChain);
|
||||
setChain(dispatch, emptyChain);
|
||||
} else {
|
||||
setChain(dispatch, loadedChain);
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ export const getChain = (chains: ChainItems) => {
|
||||
const urlChain = getChainFromUrl(chainNameFromUrl);
|
||||
const envfileChain = getChainFromEnvfile(chainNameFromUrl);
|
||||
const storedChain = getChainFromStorage(
|
||||
chainNameFromUrl || envfileChain.registryName || "cosmoshub",
|
||||
chainNameFromUrl || envfileChain.registryName || "laconic",
|
||||
chains,
|
||||
);
|
||||
|
||||
|
||||
@ -142,11 +142,6 @@ export const getChainFromUrl = (chainName: string) => {
|
||||
};
|
||||
|
||||
export const getChainFromEnvfile = (chainName: string) => {
|
||||
const registryName = process.env.NEXT_PUBLIC_REGISTRY_NAME || "";
|
||||
if (chainName && registryName !== chainName) {
|
||||
return { registryName: chainName };
|
||||
}
|
||||
|
||||
const logo = process.env.NEXT_PUBLIC_LOGO;
|
||||
const chainId = process.env.NEXT_PUBLIC_CHAIN_ID;
|
||||
const chainDisplayName = process.env.NEXT_PUBLIC_CHAIN_DISPLAY_NAME;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user