diff --git a/src/__snapshots__/storybook.test.ts.snap b/src/__snapshots__/storybook.test.ts.snap index 0f2b86f0..f4e698e8 100644 --- a/src/__snapshots__/storybook.test.ts.snap +++ b/src/__snapshots__/storybook.test.ts.snap @@ -21,11 +21,7 @@ exports[`Storyshots Explorer/Warnings Network Warning 1`] = ` Sepolia - or - - Goerli - - test networks instead. + test network instead. = ({ onClose }) => ( Blockchain transactions in this network have a cost and real consequences. We recommend you use the{' '} - Sepolia or Goerli test networks instead. + Sepolia test network instead. тип diff --git a/src/eth/provider.ts b/src/eth/provider.ts index fa1efd17..634b9ede 100644 --- a/src/eth/provider.ts +++ b/src/eth/provider.ts @@ -12,7 +12,6 @@ export const CONNECTION_TIMEOUT_IN_MILLIS = 10 * SECONDS_IN_MILLIS export const chainIdRpc = new Map([ [1, 'wss://rpc.decentraland.org/mainnet'], - [5, 'wss://rpc.decentraland.org/goerli'], [11155111, 'wss://rpc.decentraland.org/sepolia'] ]) @@ -43,10 +42,7 @@ export async function getEthereumProvider( } export async function restoreConnection(): Promise { - return await Promise.race([ - connection.tryPreviousConnection().catch(() => null), - delay(CONNECTION_TIMEOUT_IN_MILLIS) - ]) + return await Promise.race([connection.tryPreviousConnection().catch(() => null), delay(CONNECTION_TIMEOUT_IN_MILLIS)]) } export async function disconnect(): Promise { @@ -77,7 +73,7 @@ export async function switchToChainId(wantedChainId: ChainId, providerChainId: C } function delay(millis: number): Promise { - return new Promise(resolve => { + return new Promise((resolve) => { setTimeout(() => resolve(null), millis) }) -} \ No newline at end of file +} diff --git a/src/kernel-loader/index.ts b/src/kernel-loader/index.ts index ae0be3df..d51c39a5 100644 --- a/src/kernel-loader/index.ts +++ b/src/kernel-loader/index.ts @@ -20,7 +20,15 @@ import { resolveUrlFromUrn } from '@dcl/urn-resolver' import { defaultWebsiteErrorTracker, defaultKernelErrorTracker, track } from '../utils/tracking' import { injectVersions } from '../utils/rolloutVersions' import { KernelError, KernelResult } from '@dcl/kernel-interface' -import { ENV, NETWORK, withOrigin, ensureOrigin, CATALYST, RENDERER_TYPE, SHOW_WALLET_SELECTOR } from '../integration/url' +import { + ENV, + NETWORK, + withOrigin, + ensureOrigin, + CATALYST, + RENDERER_TYPE, + SHOW_WALLET_SELECTOR +} from '../integration/url' import { isElectron, launchDesktopApp } from '../integration/desktop' import { isMobile, setAsRecentlyLoggedIn } from '../integration/browser' import { FeatureFlags, isFeatureVariantEnabled } from '../state/selectors' @@ -28,10 +36,7 @@ import { FeatureFlags, isFeatureVariantEnabled } from '../state/selectors' function getWantedChainId() { let chainId: ChainId - switch(NETWORK) { - case 'goerli': - chainId = ChainId.ETHEREUM_GOERLI - break + switch (NETWORK) { case 'sepolia': chainId = ChainId.ETHEREUM_SEPOLIA break @@ -58,7 +63,7 @@ export async function authenticate(providerType: ProviderType | null) { extra: { providerType, providerChainId: providerChainId, - wantedChainId: wantedChainId, + wantedChainId: wantedChainId } }) ) @@ -111,7 +116,8 @@ export async function authenticate(providerType: ProviderType | null) { err && typeof err === 'object' && typeof (err as Error)?.message == 'string' && - ((err as Error)?.message.includes('Already processing eth_requestAccounts.') || (err as Error)?.message.includes('Please wait.')) + ((err as Error)?.message.includes('Already processing eth_requestAccounts.') || + (err as Error)?.message.includes('Please wait.')) ) { // https://github.com/decentraland/explorer-website/issues/46 store.dispatch( @@ -221,14 +227,14 @@ async function initKernel() { const kernel = await injectKernel({ kernelOptions: { - baseUrl: await resolveBaseUrl(globalThis.EXPLORER_BASE_URL || `https://cdn.decentraland.org/@dcl/explorer/latest`), + baseUrl: await resolveBaseUrl( + globalThis.EXPLORER_BASE_URL || `https://cdn.decentraland.org/@dcl/explorer/latest` + ), configurations: {} }, rendererOptions: { container, - baseUrl: await resolveBaseUrl( - globalThis.EXPLORER_BASE_URL || `https://cdn.decentraland.org/@dcl/explorer/latest` - ) + baseUrl: await resolveBaseUrl(globalThis.EXPLORER_BASE_URL || `https://cdn.decentraland.org/@dcl/explorer/latest`) } }) @@ -323,10 +329,7 @@ async function initLogin(kernel: KernelResult) { } } - if ( - isFeatureVariantEnabled(store.getState(), FeatureFlags.SeamlessLogin) && - !SHOW_WALLET_SELECTOR - ) { + if (isFeatureVariantEnabled(store.getState(), FeatureFlags.SeamlessLogin) && !SHOW_WALLET_SELECTOR) { track('seamless_login') authenticate(null).catch(defaultWebsiteErrorTracker) return @@ -335,10 +338,10 @@ async function initLogin(kernel: KernelResult) { } export function startKernel() { - if (NETWORK && NETWORK !== 'mainnet' && NETWORK !== 'goerli' && NETWORK !== 'sepolia') { + if (NETWORK && NETWORK !== 'mainnet' && NETWORK !== 'sepolia') { store.dispatch( setKernelError({ - error: new Error(`Invalid NETWORK url param, valid options are 'mainnet', 'goerli' and 'sepolia'`), + error: new Error(`Invalid NETWORK url param, valid options are 'mainnet' and 'sepolia'`), code: ErrorType.FATAL }) ) @@ -349,7 +352,7 @@ export function startKernel() { store.dispatch( setKernelError({ error: new Error( - `The "ENV" URL parameter is no longer supported. Please use NETWORK=goerli or NETWORK=sepolia in the cases where ENV=zone was used` + `The "ENV" URL parameter is no longer supported. Please use NETWORK=sepolia in the cases where ENV=zone was used` ), code: ErrorType.FATAL })