Skip to content

Commit

Permalink
change lc endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Leouarz committed Jul 23, 2024
1 parent 0d91765 commit f7c7924
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/apps-config/src/variables/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// eslint-disable-next-line
const config: { [network: string]: { url: `wss://${string}`, lcUrl: string } } = {
mainnet: {
lcUrl: process.env.MAINNET_LC || 'https://api.lightclient.mainnet.avail.tools/v1',
lcUrl: process.env.MAINNET_LC || 'https://api.lightclient.mainnet.avail.so/v1',
url: process.env.MAINNET_URL as `wss://${string}` || 'wss://mainnet-rpc.avail.so/ws'
},
turing: {
Expand All @@ -16,7 +16,7 @@ export const getLCFromUrl = (apiUrl: string) => {
if (apiUrl.includes('turing')) {
return config.turing.lcUrl;
} else {
return config.turing.lcUrl;
return config.mainnet.lcUrl;
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/apps/src/initSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function getLightClientUrl (apiUrl: string): string {
}

const stored = window.localStorage.getItem('lcUrl');
const fallUrl = getLCFromUrl(apiUrl) + '/v1';
const fallUrl = getLCFromUrl(apiUrl);

console.log('LC fallback=', fallUrl);
const fallbackUrl = fallUrl;
Expand Down

0 comments on commit f7c7924

Please sign in to comment.