From 995bae6996257737db99b4364ac07dfffa6a2bb3 Mon Sep 17 00:00:00 2001 From: Pieter Pretorius Date: Wed, 10 Jan 2024 15:34:12 +0200 Subject: [PATCH 1/2] fix: replace mainnet chain registry base url --- src/utils/chain.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/utils/chain.ts b/src/utils/chain.ts index abc0073..c7754f5 100644 --- a/src/utils/chain.ts +++ b/src/utils/chain.ts @@ -9,9 +9,15 @@ import { import { KeplrChainInfo, RegistryChainInfo } from '../types/chain'; export const fetchMainnetRegistryChainInfo = async (chainName: string): Promise => { - const url = `https://proxy.atomscan.com/directory/${chainName}/chain.json`; - const response = await axios.get(url); - return response.data as RegistryChainInfo; + try { + const url = `https://registry.ping.pub/${chainName}/chain.json`; + const response = await axios.get(url); + return response.data as RegistryChainInfo; + } catch (error) { + const url = `https://proxy.atomscan.com/directory/${chainName}/chain.json`; + const response = await axios.get(url); + return response.data as RegistryChainInfo; + } }; export const fetchTestnetRegistryChainInfo = async (chainName: string): Promise => { From cd61b9d2cc4e890dd992cd74a9427c201bf96d34 Mon Sep 17 00:00:00 2001 From: Pieter Pretorius Date: Wed, 10 Jan 2024 15:34:59 +0200 Subject: [PATCH 2/2] chore: version bump to 0.0.6 & generate docs --- docs/functions/getActiveRpcFromChainName.html | 2 +- docs/functions/getActiveRpcFromRegistryChainInfo.html | 2 +- docs/functions/getChainExplorer.html | 2 +- docs/functions/getChainExplorerAsync.html | 2 +- docs/functions/getChainNameFromAddressPrefix.html | 2 +- docs/functions/getKeplrChainInfo.html | 2 +- docs/functions/getKeplrChainInfoFromRegistryChainInfo.html | 2 +- docs/functions/getRegistryChainInfo.html | 2 +- package.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/functions/getActiveRpcFromChainName.html b/docs/functions/getActiveRpcFromChainName.html index 6193d50..f17024b 100644 --- a/docs/functions/getActiveRpcFromChainName.html +++ b/docs/functions/getActiveRpcFromChainName.html @@ -34,7 +34,7 @@
chainNetwork: ChainNetwork

Returns Promise<string>

+
  • Defined in chain.ts:73
  • Returns Promise<string>

    +
  • Defined in chain.ts:49
  • +
  • Defined in chain.ts:87
  • Returns Promise<KeplrChainExplorer>

    +
  • Defined in chain.ts:126
  • Returns string

    +
  • Defined in chain.ts:263
  • +
  • Defined in chain.ts:228
  • Returns Promise<KeplrChainInfo>

    +
  • Defined in chain.ts:198
  • +
  • Defined in chain.ts:30