This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: lcd-cosmos.cosmosstation.io api is down (#2375)
- [x] Since `https://lcd-cosmos.cosmostation.io` is not accessible for last few days (see cosmostation/web-wallet-ts-react#37), switch to `https://lcd-cosmoshub.keplr.app` . Note: `keplr.app` api does not support all endpoints. - [x] Quick fix: catchError in service/thorchain - [x] Quick fix: <button> cannot appear as a descendant of <button> - [x] Quick fix: Styles of TableHeadline in `AssetDetails`
- Loading branch information
Showing
8 changed files
with
74 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
import { Network } from '@xchainjs/xchain-client' | ||
import { ChainIds, ClientUrls } from '@xchainjs/xchain-cosmos' | ||
|
||
const clientUrl = 'https://lcd-cosmos.cosmostation.io' | ||
import { envOrDefault } from '../utils/env' | ||
|
||
// expose env (needed to access ENVs by `envOrDefault`) in `main` thread) | ||
require('dotenv').config() | ||
|
||
const MAINNET_LCD = envOrDefault(process.env.REACT_APP_COSMOS_MAINNET_LCD, 'https://lcd-cosmoshub.keplr.app') | ||
|
||
export const getClientUrls = (): ClientUrls => ({ | ||
[Network.Stagenet]: clientUrl, | ||
[Network.Mainnet]: clientUrl, | ||
[Network.Stagenet]: MAINNET_LCD, | ||
[Network.Mainnet]: MAINNET_LCD, | ||
[Network.Testnet]: 'https://rest.sentry-01.theta-testnet.polypore.xyz' | ||
}) | ||
|
||
const mainChainId = 'cosmoshub-4' | ||
/** | ||
* Default Cosmos' chain ids | ||
* | ||
* Note: All are 'unknown' by default | ||
* They need to be requested from Cosmos API | ||
* Note: All 'unknown' will be fetched from Cosmos `node_info`` endpoint | ||
* just before initializing a `xchain-cosmos` client | ||
*/ | ||
export const INITIAL_CHAIN_IDS: ChainIds = { | ||
[Network.Mainnet]: 'unkown-mainnet-chain-id', | ||
[Network.Stagenet]: 'unkown-stagenet-chain-id', | ||
[Network.Testnet]: 'unkown-testnet-chain-id' | ||
[Network.Mainnet]: mainChainId, // can't be fetched for `lcd-cosmoshub.keplr.app` | ||
[Network.Stagenet]: mainChainId, // can't be fetched for `lcd-cosmoshub.keplr.app` | ||
[Network.Testnet]: 'unkown-testnet-chain-id' // will be fetched | ||
} |