Commit ba6b9022 authored by tom's avatar tom

migrate to eslint 9 and its flat config

parent 687f764f
node_modules
node_modules_linux
playwright/envs.js
deploy/tools/envs-validator/index.js
deploy/tools/favicon-generator/index.js
deploy/tools/feature-reporter/build/**
deploy/tools/feature-reporter/index.js
public/**
\ No newline at end of file
This diff is collapsed.
...@@ -34,7 +34,7 @@ type AdsBannerFeaturePayload = { ...@@ -34,7 +34,7 @@ type AdsBannerFeaturePayload = {
mobile: AdButlerConfig; mobile: AdButlerConfig;
}; };
}; };
} };
const config: Feature<AdsBannerFeaturePayload> = (() => { const config: Feature<AdsBannerFeaturePayload> = (() => {
if (provider === 'adbutler') { if (provider === 'adbutler') {
......
...@@ -4,7 +4,7 @@ import services from '../services'; ...@@ -4,7 +4,7 @@ import services from '../services';
const title = 'Export data to CSV file'; const title = 'Export data to CSV file';
const config: Feature<{ reCaptcha: { siteKey: string }}> = (() => { const config: Feature<{ reCaptcha: { siteKey: string } }> = (() => {
if (services.reCaptchaV3.siteKey) { if (services.reCaptchaV3.siteKey) {
return Object.freeze({ return Object.freeze({
title, title,
......
...@@ -21,7 +21,7 @@ const wallets = ((): Array<WalletType> | undefined => { ...@@ -21,7 +21,7 @@ const wallets = ((): Array<WalletType> | undefined => {
const title = 'Web3 wallet integration (add token or network to the wallet)'; const title = 'Web3 wallet integration (add token or network to the wallet)';
const config: Feature<{ wallets: Array<WalletType>; addToken: { isDisabled: boolean }}> = (() => { const config: Feature<{ wallets: Array<WalletType>; addToken: { isDisabled: boolean } }> = (() => {
if (wallets && wallets.length > 0) { if (wallets && wallets.length > 0) {
return Object.freeze({ return Object.freeze({
title, title,
......
This diff is collapsed.
...@@ -4,7 +4,7 @@ type CPreferences = { ...@@ -4,7 +4,7 @@ type CPreferences = {
zone: string; zone: string;
width: string; width: string;
height: string; height: string;
} };
declare global { declare global {
export interface Window { export interface Window {
......
/* eslint-disable max-len */
import type { JestConfigWithTsJest } from 'ts-jest'; import type { JestConfigWithTsJest } from 'ts-jest';
/* /*
......
...@@ -20,7 +20,7 @@ const PAGE_PROPS = { ...@@ -20,7 +20,7 @@ const PAGE_PROPS = {
apiData: null, apiData: null,
}; };
const TestApp = ({ children }: {children: React.ReactNode}) => { const TestApp = ({ children }: { children: React.ReactNode }) => {
const [ queryClient ] = React.useState(() => new QueryClient({ const [ queryClient ] = React.useState(() => new QueryClient({
defaultOptions: { defaultOptions: {
queries: { queries: {
......
...@@ -1081,10 +1081,10 @@ export type ResourceName = keyof typeof RESOURCES; ...@@ -1081,10 +1081,10 @@ export type ResourceName = keyof typeof RESOURCES;
type ResourcePathMap = { type ResourcePathMap = {
[K in ResourceName]: typeof RESOURCES[K]['path'] [K in ResourceName]: typeof RESOURCES[K]['path']
} };
export type ResourcePath = ResourcePathMap[keyof ResourcePathMap] export type ResourcePath = ResourcePathMap[keyof ResourcePathMap];
export type ResourceFiltersKey<R extends ResourceName> = typeof RESOURCES[R] extends {filterFields: Array<unknown>} ? export type ResourceFiltersKey<R extends ResourceName> = typeof RESOURCES[R] extends { filterFields: Array<unknown> } ?
ArrayElement<typeof RESOURCES[R]['filterFields']> : ArrayElement<typeof RESOURCES[R]['filterFields']> :
never; never;
...@@ -1105,7 +1105,7 @@ export interface ResourceError<T = unknown> { ...@@ -1105,7 +1105,7 @@ export interface ResourceError<T = unknown> {
statusText: Response['statusText']; statusText: Response['statusText'];
} }
export type ResourceErrorAccount<T> = ResourceError<{ errors: T }> export type ResourceErrorAccount<T> = ResourceError<{ errors: T }>;
export type PaginatedResources = 'blocks' | 'block_txs' | 'block_election_rewards' | export type PaginatedResources = 'blocks' | 'block_txs' | 'block_election_rewards' |
'txs_validated' | 'txs_pending' | 'txs_with_blobs' | 'txs_watchlist' | 'txs_execution_node' | 'txs_validated' | 'txs_pending' | 'txs_with_blobs' | 'txs_watchlist' | 'txs_execution_node' |
...@@ -1119,7 +1119,7 @@ export type PaginatedResources = 'blocks' | 'block_txs' | 'block_election_reward ...@@ -1119,7 +1119,7 @@ export type PaginatedResources = 'blocks' | 'block_txs' | 'block_election_reward
'verified_contracts' | 'verified_contracts' |
'optimistic_l2_output_roots' | 'optimistic_l2_withdrawals' | 'optimistic_l2_txn_batches' | 'optimistic_l2_deposits' | 'optimistic_l2_output_roots' | 'optimistic_l2_withdrawals' | 'optimistic_l2_txn_batches' | 'optimistic_l2_deposits' |
'optimistic_l2_dispute_games' | 'optimistic_l2_txn_batch_txs' | 'optimistic_l2_txn_batch_blocks' | 'optimistic_l2_dispute_games' | 'optimistic_l2_txn_batch_txs' | 'optimistic_l2_txn_batch_blocks' |
'mud_worlds'| 'address_mud_tables' | 'address_mud_records' | 'mud_worlds' | 'address_mud_tables' | 'address_mud_records' |
'shibarium_deposits' | 'shibarium_withdrawals' | 'shibarium_deposits' | 'shibarium_withdrawals' |
'arbitrum_l2_messages' | 'arbitrum_l2_txn_batches' | 'arbitrum_l2_txn_batch_txs' | 'arbitrum_l2_txn_batch_blocks' | 'arbitrum_l2_messages' | 'arbitrum_l2_txn_batches' | 'arbitrum_l2_txn_batch_txs' | 'arbitrum_l2_txn_batch_blocks' |
'zkevm_l2_deposits' | 'zkevm_l2_withdrawals' | 'zkevm_l2_txn_batches' | 'zkevm_l2_txn_batch_txs' | 'zkevm_l2_deposits' | 'zkevm_l2_withdrawals' | 'zkevm_l2_txn_batches' | 'zkevm_l2_txn_batch_txs' |
...@@ -1131,7 +1131,7 @@ export type PaginatedResources = 'blocks' | 'block_txs' | 'block_election_reward ...@@ -1131,7 +1131,7 @@ export type PaginatedResources = 'blocks' | 'block_txs' | 'block_election_reward
export type PaginatedResponse<Q extends PaginatedResources> = ResourcePayload<Q>; export type PaginatedResponse<Q extends PaginatedResources> = ResourcePayload<Q>;
/* eslint-disable @typescript-eslint/indent */ /* eslint-disable @stylistic/indent */
// !!! IMPORTANT !!! // !!! IMPORTANT !!!
// Don't add any new types here because TypeScript cannot handle it properly // Don't add any new types here because TypeScript cannot handle it properly
// use ResourcePayloadB instead // use ResourcePayloadB instead
...@@ -1155,7 +1155,7 @@ Q extends 'homepage_txs_watchlist' ? Array<Transaction> : ...@@ -1155,7 +1155,7 @@ Q extends 'homepage_txs_watchlist' ? Array<Transaction> :
Q extends 'homepage_optimistic_deposits' ? Array<OptimisticL2DepositsItem> : Q extends 'homepage_optimistic_deposits' ? Array<OptimisticL2DepositsItem> :
Q extends 'homepage_arbitrum_deposits' ? ArbitrumLatestDepositsResponse : Q extends 'homepage_arbitrum_deposits' ? ArbitrumLatestDepositsResponse :
Q extends 'homepage_zkevm_l2_batches' ? { items: Array<ZkEvmL2TxnBatchesItem> } : Q extends 'homepage_zkevm_l2_batches' ? { items: Array<ZkEvmL2TxnBatchesItem> } :
Q extends 'homepage_arbitrum_l2_batches' ? { items: Array<ArbitrumL2TxnBatchesItem>} : Q extends 'homepage_arbitrum_l2_batches' ? { items: Array<ArbitrumL2TxnBatchesItem> } :
Q extends 'homepage_indexing_status' ? IndexingStatus : Q extends 'homepage_indexing_status' ? IndexingStatus :
Q extends 'homepage_zkevm_latest_batch' ? number : Q extends 'homepage_zkevm_latest_batch' ? number :
Q extends 'homepage_zksync_latest_batch' ? number : Q extends 'homepage_zksync_latest_batch' ? number :
...@@ -1237,9 +1237,9 @@ Q extends 'optimistic_l2_dispute_games_count' ? number : ...@@ -1237,9 +1237,9 @@ Q extends 'optimistic_l2_dispute_games_count' ? number :
never; never;
// !!! IMPORTANT !!! // !!! IMPORTANT !!!
// See comment above // See comment above
/* eslint-enable @typescript-eslint/indent */ /* eslint-enable @stylistic/indent */
/* eslint-disable @typescript-eslint/indent */ /* eslint-disable @stylistic/indent */
export type ResourcePayloadB<Q extends ResourceName> = export type ResourcePayloadB<Q extends ResourceName> =
Q extends 'config_backend_version' ? BackendVersionConfig : Q extends 'config_backend_version' ? BackendVersionConfig :
Q extends 'config_csv_export' ? CsvExportConfig : Q extends 'config_csv_export' ? CsvExportConfig :
...@@ -1285,7 +1285,7 @@ Q extends 'domain_protocols' ? bens.GetProtocolsResponse : ...@@ -1285,7 +1285,7 @@ Q extends 'domain_protocols' ? bens.GetProtocolsResponse :
Q extends 'user_ops' ? UserOpsResponse : Q extends 'user_ops' ? UserOpsResponse :
Q extends 'user_op' ? UserOp : Q extends 'user_op' ? UserOp :
Q extends 'user_ops_account' ? UserOpsAccount : Q extends 'user_ops_account' ? UserOpsAccount :
Q extends 'user_op_interpretation'? TxInterpretationResponse : Q extends 'user_op_interpretation' ? TxInterpretationResponse :
Q extends 'noves_transaction' ? NovesResponseData : Q extends 'noves_transaction' ? NovesResponseData :
Q extends 'noves_address_history' ? NovesAccountHistoryResponse : Q extends 'noves_address_history' ? NovesAccountHistoryResponse :
Q extends 'noves_describe_txs' ? NovesDescribeTxsResponse : Q extends 'noves_describe_txs' ? NovesDescribeTxsResponse :
...@@ -1311,7 +1311,7 @@ Q extends 'rewards_user_referrals' ? RewardsUserReferralsResponse : ...@@ -1311,7 +1311,7 @@ Q extends 'rewards_user_referrals' ? RewardsUserReferralsResponse :
Q extends 'token_transfers_all' ? TokenTransferResponse : Q extends 'token_transfers_all' ? TokenTransferResponse :
Q extends 'address_xstar_score' ? AddressXStarResponse : Q extends 'address_xstar_score' ? AddressXStarResponse :
never; never;
/* eslint-enable @typescript-eslint/indent */ /* eslint-enable @stylistic/indent */
export type ResourcePayload<Q extends ResourceName> = ResourcePayloadA<Q> | ResourcePayloadB<Q>; export type ResourcePayload<Q extends ResourceName> = ResourcePayloadA<Q> | ResourcePayloadB<Q>;
export type PaginatedResponseItems<Q extends ResourceName> = Q extends PaginatedResources ? ResourcePayloadA<Q>['items'] | ResourcePayloadB<Q>['items'] : never; export type PaginatedResponseItems<Q extends ResourceName> = Q extends PaginatedResources ? ResourcePayloadA<Q>['items'] | ResourcePayloadB<Q>['items'] : never;
...@@ -1319,7 +1319,7 @@ export type PaginatedResponseNextPageParams<Q extends ResourceName> = Q extends ...@@ -1319,7 +1319,7 @@ export type PaginatedResponseNextPageParams<Q extends ResourceName> = Q extends
ResourcePayloadA<Q>['next_page_params'] | ResourcePayloadB<Q>['next_page_params'] : ResourcePayloadA<Q>['next_page_params'] | ResourcePayloadB<Q>['next_page_params'] :
never; never;
/* eslint-disable @typescript-eslint/indent */ /* eslint-disable @stylistic/indent */
export type PaginationFilters<Q extends PaginatedResources> = export type PaginationFilters<Q extends PaginatedResources> =
Q extends 'blocks' ? BlockFilters : Q extends 'blocks' ? BlockFilters :
Q extends 'block_txs' ? TTxsWithBlobsFilters : Q extends 'block_txs' ? TTxsWithBlobsFilters :
...@@ -1346,9 +1346,9 @@ Q extends 'address_mud_tables' ? AddressMudTablesFilter : ...@@ -1346,9 +1346,9 @@ Q extends 'address_mud_tables' ? AddressMudTablesFilter :
Q extends 'address_mud_records' ? AddressMudRecordsFilter : Q extends 'address_mud_records' ? AddressMudRecordsFilter :
Q extends 'token_transfers_all' ? TokenTransferFilters : Q extends 'token_transfers_all' ? TokenTransferFilters :
never; never;
/* eslint-enable @typescript-eslint/indent */ /* eslint-enable @stylistic/indent */
/* eslint-disable @typescript-eslint/indent */ /* eslint-disable @stylistic/indent */
export type PaginationSorting<Q extends PaginatedResources> = export type PaginationSorting<Q extends PaginatedResources> =
Q extends 'tokens' ? TokensSorting : Q extends 'tokens' ? TokensSorting :
Q extends 'tokens_bridged' ? TokensSorting : Q extends 'tokens_bridged' ? TokensSorting :
...@@ -1360,4 +1360,4 @@ Q extends 'validators_stability' ? ValidatorsStabilitySorting : ...@@ -1360,4 +1360,4 @@ Q extends 'validators_stability' ? ValidatorsStabilitySorting :
Q extends 'validators_blackfort' ? ValidatorsBlackfortSorting : Q extends 'validators_blackfort' ? ValidatorsBlackfortSorting :
Q extends 'address_mud_records' ? AddressMudRecordsSorting : Q extends 'address_mud_records' ? AddressMudRecordsSorting :
never; never;
/* eslint-enable @typescript-eslint/indent */ /* eslint-enable @stylistic/indent */
import type { InfiniteData, QueryKey, UseInfiniteQueryResult } from '@tanstack/react-query'; import type { InfiniteData, QueryKey, UseInfiniteQueryResult, UseInfiniteQueryOptions } from '@tanstack/react-query';
import { useInfiniteQuery, type UseInfiniteQueryOptions } from '@tanstack/react-query'; import { useInfiniteQuery } from '@tanstack/react-query';
import type { PaginatedResources, ResourceError, ResourcePayload } from 'lib/api/resources'; import type { PaginatedResources, ResourceError, ResourcePayload } from 'lib/api/resources';
import useApiFetch from 'lib/api/useApiFetch'; import useApiFetch from 'lib/api/useApiFetch';
...@@ -28,7 +28,6 @@ export default function useApiInfiniteQuery<R extends PaginatedResources>({ ...@@ -28,7 +28,6 @@ export default function useApiInfiniteQuery<R extends PaginatedResources>({
const apiFetch = useApiFetch(); const apiFetch = useApiFetch();
return useInfiniteQuery<TQueryData<R>, TError, InfiniteData<TQueryData<R>>, QueryKey, TPageParam<R>>({ return useInfiniteQuery<TQueryData<R>, TError, InfiniteData<TQueryData<R>>, QueryKey, TPageParam<R>>({
// eslint-disable-next-line @tanstack/query/exhaustive-deps
queryKey: getResourceKey(resourceName, { pathParams }), queryKey: getResourceKey(resourceName, { pathParams }),
queryFn: (context) => { queryFn: (context) => {
const queryParams = 'pageParam' in context ? (context.pageParam || undefined) : undefined; const queryParams = 'pageParam' in context ? (context.pageParam || undefined) : undefined;
......
...@@ -28,7 +28,6 @@ export default function useApiQuery<R extends ResourceName, E = unknown, D = Res ...@@ -28,7 +28,6 @@ export default function useApiQuery<R extends ResourceName, E = unknown, D = Res
const apiFetch = useApiFetch(); const apiFetch = useApiFetch();
return useQuery<ResourcePayload<R>, ResourceError<E>, D>({ return useQuery<ResourcePayload<R>, ResourceError<E>, D>({
// eslint-disable-next-line @tanstack/query/exhaustive-deps
queryKey: queryOptions?.queryKey || getResourceKey(resource, { pathParams, queryParams }), queryKey: queryOptions?.queryKey || getResourceKey(resource, { pathParams, queryParams }),
queryFn: async({ signal }) => { queryFn: async({ signal }) => {
// all errors and error typing is handled by react-query // all errors and error typing is handled by react-query
......
...@@ -6,7 +6,7 @@ import type { Props as PageProps } from 'nextjs/getServerSideProps'; ...@@ -6,7 +6,7 @@ import type { Props as PageProps } from 'nextjs/getServerSideProps';
type Props = { type Props = {
children: React.ReactNode; children: React.ReactNode;
pageProps: PageProps; pageProps: PageProps;
} };
const AppContext = createContext<PageProps>({ const AppContext = createContext<PageProps>({
cookies: '', cookies: '',
......
...@@ -3,12 +3,12 @@ import React, { createContext, useContext, useEffect, useState, useMemo } from ' ...@@ -3,12 +3,12 @@ import React, { createContext, useContext, useEffect, useState, useMemo } from '
type Props = { type Props = {
children: React.ReactNode; children: React.ReactNode;
} };
type TMarketplaceContext = { type TMarketplaceContext = {
isAutoConnectDisabled: boolean; isAutoConnectDisabled: boolean;
setIsAutoConnectDisabled: (isAutoConnectDisabled: boolean) => void; setIsAutoConnectDisabled: (isAutoConnectDisabled: boolean) => void;
} };
export const MarketplaceContext = createContext<TMarketplaceContext>({ export const MarketplaceContext = createContext<TMarketplaceContext>({
isAutoConnectDisabled: false, isAutoConnectDisabled: false,
......
...@@ -46,7 +46,7 @@ type TRewardsContext = { ...@@ -46,7 +46,7 @@ type TRewardsContext = {
closeLoginModal: () => void; closeLoginModal: () => void;
login: (refCode: string) => Promise<{ isNewUser?: boolean; invalidRefCodeError?: boolean }>; login: (refCode: string) => Promise<{ isNewUser?: boolean; invalidRefCodeError?: boolean }>;
claim: () => Promise<void>; claim: () => Promise<void>;
} };
const defaultQueryResult = { const defaultQueryResult = {
data: undefined, data: undefined,
...@@ -108,7 +108,7 @@ function getRegisteredAddress(token: string) { ...@@ -108,7 +108,7 @@ function getRegisteredAddress(token: string) {
type Props = { type Props = {
children: React.ReactNode; children: React.ReactNode;
} };
export function RewardsContextProvider({ children }: Props) { export function RewardsContextProvider({ children }: Props) {
const router = useRouter(); const router = useRouter();
......
...@@ -22,7 +22,7 @@ export function SettingsContextProvider({ children }: SettingsProviderProps) { ...@@ -22,7 +22,7 @@ export function SettingsContextProvider({ children }: SettingsProviderProps) {
const initialAddressFormat = cookies.get(cookies.NAMES.ADDRESS_FORMAT, appCookies); const initialAddressFormat = cookies.get(cookies.NAMES.ADDRESS_FORMAT, appCookies);
const [ addressFormat, setAddressFormat ] = React.useState<AddressFormat>( const [ addressFormat, setAddressFormat ] = React.useState<AddressFormat>(
initialAddressFormat && ADDRESS_FORMATS.includes(initialAddressFormat) ? initialAddressFormat as AddressFormat : 'base16', initialAddressFormat && ADDRESS_FORMATS.includes(initialAddressFormat as AddressFormat) ? initialAddressFormat as AddressFormat : 'base16',
); );
const toggleAddressFormat = React.useCallback(() => { const toggleAddressFormat = React.useCallback(() => {
......
...@@ -3,20 +3,20 @@ import Cookies from 'js-cookie'; ...@@ -3,20 +3,20 @@ import Cookies from 'js-cookie';
import isBrowser from './isBrowser'; import isBrowser from './isBrowser';
export enum NAMES { export enum NAMES {
NAV_BAR_COLLAPSED='nav_bar_collapsed', NAV_BAR_COLLAPSED = 'nav_bar_collapsed',
API_TOKEN='_explorer_key', API_TOKEN = '_explorer_key',
REWARDS_API_TOKEN='rewards_api_token', REWARDS_API_TOKEN = 'rewards_api_token',
REWARDS_REFERRAL_CODE='rewards_ref_code', REWARDS_REFERRAL_CODE = 'rewards_ref_code',
TXS_SORT='txs_sort', TXS_SORT = 'txs_sort',
COLOR_MODE='chakra-ui-color-mode', COLOR_MODE = 'chakra-ui-color-mode',
COLOR_MODE_HEX='chakra-ui-color-mode-hex', COLOR_MODE_HEX = 'chakra-ui-color-mode-hex',
ADDRESS_IDENTICON_TYPE='address_identicon_type', ADDRESS_IDENTICON_TYPE = 'address_identicon_type',
ADDRESS_FORMAT='address_format', ADDRESS_FORMAT = 'address_format',
INDEXING_ALERT='indexing_alert', INDEXING_ALERT = 'indexing_alert',
ADBLOCK_DETECTED='adblock_detected', ADBLOCK_DETECTED = 'adblock_detected',
MIXPANEL_DEBUG='_mixpanel_debug', MIXPANEL_DEBUG = '_mixpanel_debug',
ADDRESS_NFT_DISPLAY_TYPE='address_nft_display_type', ADDRESS_NFT_DISPLAY_TYPE = 'address_nft_display_type',
UUID='uuid', UUID = 'uuid',
} }
export function get(name?: NAMES | undefined | null, serverCookie?: string) { export function get(name?: NAMES | undefined | null, serverCookie?: string) {
......
...@@ -8,7 +8,7 @@ type Params = ({ ...@@ -8,7 +8,7 @@ type Params = ({
error: null; error: null;
}) & { }) & {
resource?: ResourceName; resource?: ResourceName;
} };
export const RESOURCE_LOAD_ERROR_MESSAGE = 'Resource load error'; export const RESOURCE_LOAD_ERROR_MESSAGE = 'Resource load error';
......
...@@ -4,7 +4,7 @@ type Args = { ...@@ -4,7 +4,7 @@ type Args = {
status: ArbitrumBatchStatus; status: ArbitrumBatchStatus;
commitment_transaction: ArbitrumL2TxData; commitment_transaction: ArbitrumL2TxData;
confirmation_transaction: ArbitrumL2TxData; confirmation_transaction: ArbitrumL2TxData;
} };
export default function getArbitrumVerificationStepStatus({ export default function getArbitrumVerificationStepStatus({
status, status,
......
...@@ -9,7 +9,7 @@ const feature = config.features.marketplace; ...@@ -9,7 +9,7 @@ const feature = config.features.marketplace;
export default function useGraphLinks() { export default function useGraphLinks() {
const fetch = useFetch(); const fetch = useFetch();
return useQuery<unknown, ResourceError<unknown>, Record<string, Array<{text: string; url: string}>>>({ return useQuery<unknown, ResourceError<unknown>, Record<string, Array<{ text: string; url: string }>>>({
queryKey: [ 'graph-links' ], queryKey: [ 'graph-links' ],
queryFn: async() => fetch((feature.isEnabled && feature.graphLinksUrl) ? feature.graphLinksUrl : '', undefined, { resource: 'graph-links' }), queryFn: async() => fetch((feature.isEnabled && feature.graphLinksUrl) ? feature.graphLinksUrl : '', undefined, { resource: 'graph-links' }),
enabled: feature.isEnabled && Boolean(feature.graphLinksUrl), enabled: feature.isEnabled && Boolean(feature.graphLinksUrl),
......
import type React from 'react';
export default function isMetaKey(event: React.KeyboardEvent) { export default function isMetaKey(event: React.KeyboardEvent) {
return event.metaKey || event.getModifierState('Meta'); return event.metaKey || event.getModifierState('Meta');
} }
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import type { Route } from 'nextjs-routes'; import type { Route } from 'nextjs-routes';
// equal og:description // equal og:description
// eslint-disable-next-line max-len
const DEFAULT_TEMPLATE = 'Blockscout is the #1 open-source blockchain explorer available today. 100+ chains and counting rely on Blockscout data availability, APIs, and ecosystem tools to support their networks.'; const DEFAULT_TEMPLATE = 'Blockscout is the #1 open-source blockchain explorer available today. 100+ chains and counting rely on Blockscout data availability, APIs, and ecosystem tools to support their networks.';
// FIXME all page descriptions will be updated later // FIXME all page descriptions will be updated later
......
...@@ -3,7 +3,7 @@ import type { TokenInfo } from 'types/api/token'; ...@@ -3,7 +3,7 @@ import type { TokenInfo } from 'types/api/token';
import type { Route } from 'nextjs-routes'; import type { Route } from 'nextjs-routes';
/* eslint-disable @typescript-eslint/indent */ /* eslint-disable @stylistic/indent */
export type ApiData<Pathname extends Route['pathname']> = export type ApiData<Pathname extends Route['pathname']> =
( (
Pathname extends '/address/[hash]' ? { domain_name: string } : Pathname extends '/address/[hash]' ? { domain_name: string } :
......
...@@ -26,13 +26,13 @@ export enum EventTypes { ...@@ -26,13 +26,13 @@ export enum EventTypes {
APP_FEEDBACK = 'App feedback', APP_FEEDBACK = 'App feedback',
} }
/* eslint-disable @typescript-eslint/indent */ /* eslint-disable @stylistic/indent */
export type EventPayload<Type extends EventTypes> = export type EventPayload<Type extends EventTypes> =
Type extends EventTypes.PAGE_VIEW ? Type extends EventTypes.PAGE_VIEW ?
{ {
'Page type': string; 'Page type': string;
'Tab': string; Tab: string;
'Page'?: string; Page?: string;
'Color mode': 'light' | 'dark'; 'Color mode': 'light' | 'dark';
'Color theme': ColorThemeId | undefined; 'Color theme': ColorThemeId | undefined;
} : } :
...@@ -43,70 +43,70 @@ Type extends EventTypes.SEARCH_QUERY ? { ...@@ -43,70 +43,70 @@ Type extends EventTypes.SEARCH_QUERY ? {
} : } :
Type extends EventTypes.LOCAL_SEARCH ? { Type extends EventTypes.LOCAL_SEARCH ? {
'Search query': string; 'Search query': string;
'Source': 'Marketplace'; Source: 'Marketplace';
} : } :
Type extends EventTypes.ADD_TO_WALLET ? ( Type extends EventTypes.ADD_TO_WALLET ? (
{ {
'Wallet': WalletType; Wallet: WalletType;
'Target': 'network'; Target: 'network';
} | { } | {
'Wallet': WalletType; Wallet: WalletType;
'Target': 'token'; Target: 'token';
'Token': string; Token: string;
} }
) : ) :
Type extends EventTypes.ACCOUNT_ACCESS ? { Type extends EventTypes.ACCOUNT_ACCESS ? {
'Action': 'Dropdown open' | 'Logged out'; Action: 'Dropdown open' | 'Logged out';
} : } :
Type extends EventTypes.LOGIN ? ( Type extends EventTypes.LOGIN ? (
{ {
'Action': 'Started'; Action: 'Started';
'Source': string; Source: string;
} | { } | {
'Action': 'Wallet' | 'Email'; Action: 'Wallet' | 'Email';
'Source': 'Options selector'; Source: 'Options selector';
} | { } | {
'Action': 'OTP sent'; Action: 'OTP sent';
'Source': 'Email'; Source: 'Email';
} | { } | {
'Action': 'Success'; Action: 'Success';
'Source': 'Email' | 'Wallet'; Source: 'Email' | 'Wallet';
} }
) : ) :
Type extends EventTypes.ACCOUNT_LINK_INFO ? { Type extends EventTypes.ACCOUNT_LINK_INFO ? {
'Source': 'Profile' | 'Login modal' | 'Profile dropdown' | 'Merits'; Source: 'Profile' | 'Login modal' | 'Profile dropdown' | 'Merits';
'Status': 'Started' | 'OTP sent' | 'Finished'; Status: 'Started' | 'OTP sent' | 'Finished';
'Type': 'Email' | 'Wallet'; Type: 'Email' | 'Wallet';
} : } :
Type extends EventTypes.PRIVATE_TAG ? { Type extends EventTypes.PRIVATE_TAG ? {
'Action': 'Form opened' | 'Submit'; Action: 'Form opened' | 'Submit';
'Page type': string; 'Page type': string;
'Tag type': 'Address' | 'Tx'; 'Tag type': 'Address' | 'Tx';
} : } :
Type extends EventTypes.VERIFY_ADDRESS ? ( Type extends EventTypes.VERIFY_ADDRESS ? (
{ {
'Action': 'Form opened' | 'Address entered'; Action: 'Form opened' | 'Address entered';
'Page type': string; 'Page type': string;
} | { } | {
'Action': 'Sign ownership'; Action: 'Sign ownership';
'Page type': string; 'Page type': string;
'Sign method': 'wallet' | 'manual'; 'Sign method': 'wallet' | 'manual';
} }
) : ) :
Type extends EventTypes.VERIFY_TOKEN ? { Type extends EventTypes.VERIFY_TOKEN ? {
'Action': 'Form opened' | 'Submit'; Action: 'Form opened' | 'Submit';
} : } :
Type extends EventTypes.WALLET_CONNECT ? { Type extends EventTypes.WALLET_CONNECT ? {
'Source': 'Header' | 'Login' | 'Profile' | 'Profile dropdown' | 'Smart contracts' | 'Swap button' | 'Merits'; Source: 'Header' | 'Login' | 'Profile' | 'Profile dropdown' | 'Smart contracts' | 'Swap button' | 'Merits';
'Status': 'Started' | 'Connected'; Status: 'Started' | 'Connected';
} : } :
Type extends EventTypes.WALLET_ACTION ? ( Type extends EventTypes.WALLET_ACTION ? (
{ {
'Action': 'Open' | 'Address click'; Action: 'Open' | 'Address click';
} | { } | {
'Action': 'Send Transaction' | 'Sign Message' | 'Sign Typed Data'; Action: 'Send Transaction' | 'Sign Message' | 'Sign Typed Data';
'Address': string | undefined; Address: string | undefined;
'AppId': string; AppId: string;
} }
) : ) :
Type extends EventTypes.CONTRACT_INTERACTION ? { Type extends EventTypes.CONTRACT_INTERACTION ? {
...@@ -114,60 +114,60 @@ Type extends EventTypes.CONTRACT_INTERACTION ? { ...@@ -114,60 +114,60 @@ Type extends EventTypes.CONTRACT_INTERACTION ? {
'Method name': string; 'Method name': string;
} : } :
Type extends EventTypes.CONTRACT_VERIFICATION ? { Type extends EventTypes.CONTRACT_VERIFICATION ? {
'Method': string; Method: string;
'Status': 'Method selected' | 'Finished'; Status: 'Method selected' | 'Finished';
} : } :
Type extends EventTypes.QR_CODE ? { Type extends EventTypes.QR_CODE ? {
'Page type': string; 'Page type': string;
} : } :
Type extends EventTypes.PAGE_WIDGET ? ( Type extends EventTypes.PAGE_WIDGET ? (
{ {
'Type': 'Tokens dropdown' | 'Tokens show all (icon)' | 'Add to watchlist' | 'Address actions (more button)'; Type: 'Tokens dropdown' | 'Tokens show all (icon)' | 'Add to watchlist' | 'Address actions (more button)';
} | { } | {
'Type': 'Favorite app' | 'More button' | 'Security score' | 'Total contracts' | 'Verified contracts' | 'Analyzed contracts'; Type: 'Favorite app' | 'More button' | 'Security score' | 'Total contracts' | 'Verified contracts' | 'Analyzed contracts';
'Info': string; Info: string;
'Source': 'Discovery view' | 'Security view' | 'App modal' | 'App page' | 'Security score popup' | 'Banner'; Source: 'Discovery view' | 'Security view' | 'App modal' | 'App page' | 'Security score popup' | 'Banner';
} | { } | {
'Type': 'Security score'; Type: 'Security score';
'Source': 'Analyzed contracts popup'; Source: 'Analyzed contracts popup';
} | { } | {
'Type': 'Action button'; Type: 'Action button';
'Info': string; Info: string;
'Source': 'Txn' | 'NFT collection' | 'NFT item'; Source: 'Txn' | 'NFT collection' | 'NFT item';
} | { } | {
'Type': 'Address tag'; Type: 'Address tag';
'Info': string; Info: string;
'URL': string; URL: string;
} | { } | {
'Type': 'Share chart'; Type: 'Share chart';
'Info': string; Info: string;
} }
) : ) :
Type extends EventTypes.TX_INTERPRETATION_INTERACTION ? { Type extends EventTypes.TX_INTERPRETATION_INTERACTION ? {
'Type': 'Address click' | 'Token click' | 'Domain click'; Type: 'Address click' | 'Token click' | 'Domain click';
} : } :
Type extends EventTypes.EXPERIMENT_STARTED ? { Type extends EventTypes.EXPERIMENT_STARTED ? {
'Experiment name': string; 'Experiment name': string;
'Variant name': string; 'Variant name': string;
'Source': 'growthbook'; Source: 'growthbook';
} : } :
Type extends EventTypes.FILTERS ? { Type extends EventTypes.FILTERS ? {
'Source': 'Marketplace'; Source: 'Marketplace';
'Filter name': string; 'Filter name': string;
} : } :
Type extends EventTypes.BUTTON_CLICK ? { Type extends EventTypes.BUTTON_CLICK ? {
'Content': string; Content: string;
'Source': string; Source: string;
} : } :
Type extends EventTypes.PROMO_BANNER ? { Type extends EventTypes.PROMO_BANNER ? {
'Source': 'Marketplace'; Source: 'Marketplace';
'Link': string; Link: string;
} : } :
Type extends EventTypes.APP_FEEDBACK ? { Type extends EventTypes.APP_FEEDBACK ? {
'Action': 'Rating'; Action: 'Rating';
'Source': 'Discovery' | 'App modal' | 'App page'; Source: 'Discovery' | 'App modal' | 'App page';
'AppId': string; AppId: string;
'Score': number; Score: number;
} : } :
undefined; undefined;
/* eslint-enable @typescript-eslint/indent */ /* eslint-enable @stylistic/indent */
...@@ -47,11 +47,10 @@ interface SocketMessageParamsGeneric<Event extends string | undefined, Payload e ...@@ -47,11 +47,10 @@ interface SocketMessageParamsGeneric<Event extends string | undefined, Payload e
handler: (payload: Payload) => void; handler: (payload: Payload) => void;
} }
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace SocketMessage { export namespace SocketMessage {
export type NewBlock = SocketMessageParamsGeneric<'new_block', NewBlockSocketResponse>; export type NewBlock = SocketMessageParamsGeneric<'new_block', NewBlockSocketResponse>;
export type BlocksIndexStatus = SocketMessageParamsGeneric<'block_index_status', {finished: boolean; ratio: string}>; export type BlocksIndexStatus = SocketMessageParamsGeneric<'block_index_status', { finished: boolean; ratio: string }>;
export type InternalTxsIndexStatus = SocketMessageParamsGeneric<'internal_txs_index_status', {finished: boolean; ratio: string}>; export type InternalTxsIndexStatus = SocketMessageParamsGeneric<'internal_txs_index_status', { finished: boolean; ratio: string }>;
export type TxStatusUpdate = SocketMessageParamsGeneric<'collated', NewBlockSocketResponse>; export type TxStatusUpdate = SocketMessageParamsGeneric<'collated', NewBlockSocketResponse>;
export type TxRawTrace = SocketMessageParamsGeneric<'raw_trace', RawTracesResponse>; export type TxRawTrace = SocketMessageParamsGeneric<'raw_trace', RawTracesResponse>;
export type NewTx = SocketMessageParamsGeneric<'transaction', { transaction: number }>; export type NewTx = SocketMessageParamsGeneric<'transaction', { transaction: number }>;
...@@ -73,8 +72,8 @@ export namespace SocketMessage { ...@@ -73,8 +72,8 @@ export namespace SocketMessage {
export type AddressChangedBytecode = SocketMessageParamsGeneric<'changed_bytecode', Record<string, never>>; export type AddressChangedBytecode = SocketMessageParamsGeneric<'changed_bytecode', Record<string, never>>;
export type AddressFetchedBytecode = SocketMessageParamsGeneric<'fetched_bytecode', { fetched_bytecode: string }>; export type AddressFetchedBytecode = SocketMessageParamsGeneric<'fetched_bytecode', { fetched_bytecode: string }>;
export type SmartContractWasVerified = SocketMessageParamsGeneric<'smart_contract_was_verified', Record<string, never>>; export type SmartContractWasVerified = SocketMessageParamsGeneric<'smart_contract_was_verified', Record<string, never>>;
export type TokenTransfers = SocketMessageParamsGeneric<'token_transfer', {token_transfer: number }>; export type TokenTransfers = SocketMessageParamsGeneric<'token_transfer', { token_transfer: number }>;
export type TokenTotalSupply = SocketMessageParamsGeneric<'total_supply', {total_supply: number }>; export type TokenTotalSupply = SocketMessageParamsGeneric<'total_supply', { total_supply: number }>;
export type TokenInstanceMetadataFetched = SocketMessageParamsGeneric<'fetched_token_instance_metadata', TokenInstanceMetadataSocketMessage>; export type TokenInstanceMetadataFetched = SocketMessageParamsGeneric<'fetched_token_instance_metadata', TokenInstanceMetadataSocketMessage>;
export type ContractVerification = SocketMessageParamsGeneric<'verification_result', SmartContractVerificationResponse>; export type ContractVerification = SocketMessageParamsGeneric<'verification_result', SmartContractVerificationResponse>;
export type NewZkEvmL2Batch = SocketMessageParamsGeneric<'new_zkevm_confirmed_batch', NewZkEvmBatchSocketResponse>; export type NewZkEvmL2Batch = SocketMessageParamsGeneric<'new_zkevm_confirmed_batch', NewZkEvmBatchSocketResponse>;
......
...@@ -41,7 +41,6 @@ export default function useAddOrSwitchChain() { ...@@ -41,7 +41,6 @@ export default function useAddOrSwitchChain() {
blockExplorerUrls: [ config.app.baseUrl ], blockExplorerUrls: [ config.app.baseUrl ],
} ] as never; } ] as never;
// in wagmi types for wallet_addEthereumChain method is not provided // in wagmi types for wallet_addEthereumChain method is not provided
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return await provider.request({ return await provider.request({
method: 'wallet_addEthereumChain', method: 'wallet_addEthereumChain',
......
...@@ -41,7 +41,7 @@ export const userOpData: UserOp = { ...@@ -41,7 +41,7 @@ export const userOpData: UserOp = {
}, },
sponsor_type: 'paymaster_sponsor', sponsor_type: 'paymaster_sponsor',
raw: { raw: {
// eslint-disable-next-line max-len
call_data: '0xb61d27f600000000000000000000000059f6aa952df7f048fd076e33e0ea8bb552d5ffd8000000000000000000000000000000000000000000000000003f3d017500800000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000', call_data: '0xb61d27f600000000000000000000000059f6aa952df7f048fd076e33e0ea8bb552d5ffd8000000000000000000000000000000000000000000000000003f3d017500800000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
call_gas_limit: '26624', call_gas_limit: '26624',
init_code: '0x', init_code: '0x',
......
import type { NextPage } from 'next'; import type { NextPage } from 'next';
import type React from 'react';
import type { Route } from 'nextjs-routes'; import type { Route } from 'nextjs-routes';
// eslint-disable-next-line @typescript-eslint/ban-types
export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & { export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
getLayout?: (page: React.ReactElement) => React.ReactNode; getLayout?: (page: React.ReactElement) => React.ReactNode;
} };
export interface RouteParams<Pathname extends Route['pathname']> { export interface RouteParams<Pathname extends Route['pathname']> {
pathname: Pathname; pathname: Pathname;
......
...@@ -9,7 +9,7 @@ type ReturnType = { ...@@ -9,7 +9,7 @@ type ReturnType = {
} | { } | {
type: 'search_engine'; type: 'search_engine';
bot: SearchEngineBot; bot: SearchEngineBot;
} | undefined } | undefined;
export default function detectBotRequest(req: IncomingMessage): ReturnType { export default function detectBotRequest(req: IncomingMessage): ReturnType {
const userAgent = req.headers['user-agent']; const userAgent = req.headers['user-agent'];
......
...@@ -19,7 +19,7 @@ type Params<R extends ResourceName> = ( ...@@ -19,7 +19,7 @@ type Params<R extends ResourceName> = (
} }
) & { ) & {
timeout?: number; timeout?: number;
} };
export default async function fetchApi<R extends ResourceName = never, S = ResourcePayload<R>>(params: Params<R>): Promise<S | undefined> { export default async function fetchApi<R extends ResourceName = never, S = ResourcePayload<R>>(params: Params<R>): Promise<S | undefined> {
const controller = new AbortController(); const controller = new AbortController();
......
...@@ -117,10 +117,14 @@ ...@@ -117,10 +117,14 @@
"xss": "^1.0.14" "xss": "^1.0.14"
}, },
"devDependencies": { "devDependencies": {
"@eslint/compat": "1.2.2",
"@eslint/js": "9.14.0",
"@next/eslint-plugin-next": "15.0.3",
"@playwright/experimental-ct-react": "1.47.2", "@playwright/experimental-ct-react": "1.47.2",
"@playwright/test": "1.47.2", "@playwright/test": "1.47.2",
"@stylistic/eslint-plugin": "2.10.1",
"@svgr/webpack": "^6.5.1", "@svgr/webpack": "^6.5.1",
"@tanstack/eslint-plugin-query": "^5.0.5", "@tanstack/eslint-plugin-query": "5.60.1",
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"@total-typescript/ts-reset": "^0.4.0", "@total-typescript/ts-reset": "^0.4.0",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.1.1",
...@@ -142,14 +146,18 @@ ...@@ -142,14 +146,18 @@
"@vitejs/plugin-react": "^4.0.0", "@vitejs/plugin-react": "^4.0.0",
"css-loader": "^6.7.3", "css-loader": "^6.7.3",
"dotenv-cli": "^6.0.0", "dotenv-cli": "^6.0.0",
"eslint": "^8.32.0", "eslint": "9.14.0",
"eslint-config-next": "15.0.3", "eslint-config-next": "15.0.3",
"eslint-plugin-es5": "^1.5.0", "eslint-plugin-import": "2.31.0",
"eslint-plugin-import-helpers": "^1.2.1", "eslint-plugin-import-helpers": "2.0.1",
"eslint-plugin-jest": "^27.1.6", "eslint-plugin-jest": "28.9.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-no-cyrillic-string": "^1.0.5", "eslint-plugin-no-cyrillic-string": "^1.0.5",
"eslint-plugin-playwright": "^0.11.2", "eslint-plugin-playwright": "2.0.1",
"eslint-plugin-regexp": "^1.7.0", "eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-regexp": "2.6.0",
"globals": "15.12.0",
"husky": "^8.0.0", "husky": "^8.0.0",
"jest": "^29.2.1", "jest": "^29.2.1",
"jest-environment-jsdom": "^29.2.1", "jest-environment-jsdom": "^29.2.1",
...@@ -162,6 +170,7 @@ ...@@ -162,6 +170,7 @@
"ts-jest": "^29.0.3", "ts-jest": "^29.0.3",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "5.4.2", "typescript": "5.4.2",
"typescript-eslint": "8.14.0",
"vite-plugin-svgr": "^2.2.2", "vite-plugin-svgr": "^2.2.2",
"vite-tsconfig-paths": "4.3.2", "vite-tsconfig-paths": "4.3.2",
"ws": "^8.17.1" "ws": "^8.17.1"
......
...@@ -32,7 +32,7 @@ import 'lib/setLocale'; ...@@ -32,7 +32,7 @@ import 'lib/setLocale';
type AppPropsWithLayout = AppProps & { type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout; Component: NextPageWithLayout;
} };
const ERROR_SCREEN_STYLES: ChakraProps = { const ERROR_SCREEN_STYLES: ChakraProps = {
h: '100vh', h: '100vh',
......
...@@ -7,7 +7,7 @@ import * as cookies from 'lib/cookies'; ...@@ -7,7 +7,7 @@ import * as cookies from 'lib/cookies';
type Props = ServerSidePropsCommon & { type Props = ServerSidePropsCommon & {
statusCode: number; statusCode: number;
} };
const CustomErrorComponent = (props: Props) => { const CustomErrorComponent = (props: Props) => {
const colorModeCookie = cookies.getFromCookieString(props.cookies || '', cookies.NAMES.COLOR_MODE); const colorModeCookie = cookies.getFromCookieString(props.cookies || '', cookies.NAMES.COLOR_MODE);
......
...@@ -16,7 +16,7 @@ const pathname: Route['pathname'] = '/address/[hash]'; ...@@ -16,7 +16,7 @@ const pathname: Route['pathname'] = '/address/[hash]';
const Page: NextPage<Props<typeof pathname>> = (props: Props<typeof pathname>) => { const Page: NextPage<Props<typeof pathname>> = (props: Props<typeof pathname>) => {
return ( return (
<PageNextJs pathname="/address/[hash]" query={ props.query } apiData={ props.apiData }> <PageNextJs pathname={ pathname } query={ props.query } apiData={ props.apiData }>
<Address/> <Address/>
</PageNextJs> </PageNextJs>
); );
......
import type { NextApiRequest, NextApiResponse } from 'next'; import type { NextApiRequest, NextApiResponse } from 'next';
export default async function configHandler(req: NextApiRequest, res: NextApiResponse) { export default async function configHandler(req: NextApiRequest, res: NextApiResponse) {
// eslint-disable-next-line no-restricted-properties
const publicEnvs = Object.entries(process.env) const publicEnvs = Object.entries(process.env)
.filter(([ key ]) => key.startsWith('NEXT_PUBLIC_')) .filter(([ key ]) => key.startsWith('NEXT_PUBLIC_'))
.sort(([ keyA ], [ keyB ]) => keyA.localeCompare(keyB)) .sort(([ keyA ], [ keyB ]) => keyA.localeCompare(keyB))
......
import type { NextApiRequest, NextApiResponse } from 'next'; import type { NextApiRequest, NextApiResponse } from 'next';
import * as promClient from 'prom-client'; import * as promClient from 'prom-client';
// eslint-disable-next-line no-restricted-properties
const isEnabled = process.env.PROMETHEUS_METRICS_ENABLED === 'true'; const isEnabled = process.env.PROMETHEUS_METRICS_ENABLED === 'true';
isEnabled && promClient.collectDefaultMetrics({ prefix: 'frontend_' }); isEnabled && promClient.collectDefaultMetrics({ prefix: 'frontend_' });
......
...@@ -12,8 +12,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) ...@@ -12,8 +12,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
try { try {
const payload = JSON.parse(req.body); const payload = JSON.parse(req.body);
metrics?.invalidApiSchema.inc(v.parse(PayloadSchema, payload)); metrics?.invalidApiSchema.inc(v.parse(PayloadSchema, payload));
} catch (error) { } catch (error) {}
}
res.status(200).json({ status: 'ok' }); res.status(200).json({ status: 'ok' });
} }
...@@ -23,7 +23,7 @@ const feature = config.features.marketplace; ...@@ -23,7 +23,7 @@ const feature = config.features.marketplace;
const Page: NextPageWithLayout<Props<typeof pathname>> = (props: Props<typeof pathname>) => { const Page: NextPageWithLayout<Props<typeof pathname>> = (props: Props<typeof pathname>) => {
return ( return (
<PageNextJs pathname="/apps/[id]" query={ props.query } apiData={ props.apiData }> <PageNextJs pathname={ pathname } query={ props.query } apiData={ props.apiData }>
<MarketplaceApp/> <MarketplaceApp/>
</PageNextJs> </PageNextJs>
); );
......
...@@ -19,7 +19,7 @@ const pathname: Route['pathname'] = '/stats/[id]'; ...@@ -19,7 +19,7 @@ const pathname: Route['pathname'] = '/stats/[id]';
const Page: NextPage<Props<typeof pathname>> = (props: Props<typeof pathname>) => { const Page: NextPage<Props<typeof pathname>> = (props: Props<typeof pathname>) => {
return ( return (
<PageNextJs pathname="/stats/[id]" query={ props.query } apiData={ props.apiData }> <PageNextJs pathname={ pathname } query={ props.query } apiData={ props.apiData }>
<Chart/> <Chart/>
</PageNextJs> </PageNextJs>
); );
......
...@@ -16,7 +16,7 @@ const pathname: Route['pathname'] = '/token/[hash]'; ...@@ -16,7 +16,7 @@ const pathname: Route['pathname'] = '/token/[hash]';
const Page: NextPage<Props<typeof pathname>> = (props: Props<typeof pathname>) => { const Page: NextPage<Props<typeof pathname>> = (props: Props<typeof pathname>) => {
return ( return (
<PageNextJs pathname="/token/[hash]" query={ props.query } apiData={ props.apiData }> <PageNextJs pathname={ pathname } query={ props.query } apiData={ props.apiData }>
<Token/> <Token/>
</PageNextJs> </PageNextJs>
); );
......
...@@ -30,7 +30,7 @@ export type Props = { ...@@ -30,7 +30,7 @@ export type Props = {
isAutoConnectDisabled: boolean; isAutoConnectDisabled: boolean;
setIsAutoConnectDisabled: (isAutoConnectDisabled: boolean) => void; setIsAutoConnectDisabled: (isAutoConnectDisabled: boolean) => void;
}; };
} };
const defaultAppContext = { const defaultAppContext = {
pageProps: { pageProps: {
......
/* eslint-disable max-len */
import type { TestFixture, Page } from '@playwright/test'; import type { TestFixture, Page } from '@playwright/test';
export type MockFeaturesFixture = (features: Array<[string, unknown]>) => Promise<void>; export type MockFeaturesFixture = (features: Array<[string, unknown]>) => Promise<void>;
......
...@@ -9,16 +9,20 @@ import TestApp from 'playwright/TestApp'; ...@@ -9,16 +9,20 @@ import TestApp from 'playwright/TestApp';
interface MountResult extends Locator { interface MountResult extends Locator {
unmount(): Promise<void>; unmount(): Promise<void>;
update(component: JSX.Element): Promise<void>; update(component: React.JSX.Element): Promise<void>;
} }
interface AppHooksConfig { interface AppHooksConfig {
router: Partial<Pick<typeof router, 'query' | 'isReady' | 'asPath' | 'pathname'>>; router: Partial<Pick<typeof router, 'query' | 'isReady' | 'asPath' | 'pathname'>>;
} }
type Mount = <HooksConfig extends AppHooksConfig>(component: JSX.Element, options?: MountOptions<HooksConfig>) => Promise<MountResult> type Mount = <HooksConfig extends AppHooksConfig>(component: React.JSX.Element, options?: MountOptions<HooksConfig>) => Promise<MountResult>;
export type RenderFixture = (component: JSX.Element, options?: MountOptions<AppHooksConfig>, props?: Omit<TestAppProps, 'children'>) => Promise<MountResult> export type RenderFixture = (
component: React.JSX.Element,
options?: MountOptions<AppHooksConfig>,
props?: Omit<TestAppProps, 'children'>
) => Promise<MountResult>;
const fixture: TestFixture<RenderFixture, { mount: Mount }> = async({ mount }, use) => { const fixture: TestFixture<RenderFixture, { mount: Mount }> = async({ mount }, use) => {
await use((component, options, props) => { await use((component, options, props) => {
......
...@@ -20,7 +20,7 @@ export interface SocketServerFixture { ...@@ -20,7 +20,7 @@ export interface SocketServerFixture {
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
export const createSocket: TestFixture<CreateSocketFixture, { page: Page}> = async({ page }, use) => { export const createSocket: TestFixture<CreateSocketFixture, { page: Page }> = async({ page }, use) => {
const socketServer = new WebSocketServer({ port: socketPort }); const socketServer = new WebSocketServer({ port: socketPort });
const connectionPromise = new Promise<WebSocket>((resolve) => { const connectionPromise = new Promise<WebSocket>((resolve) => {
...@@ -70,7 +70,7 @@ export function sendMessage(socket: WebSocket, channel: Channel, msg: 'pending_t ...@@ -70,7 +70,7 @@ export function sendMessage(socket: WebSocket, channel: Channel, msg: 'pending_t
export function sendMessage(socket: WebSocket, channel: Channel, msg: 'pending_transaction', payload: { pending_transactions: Array<Transaction> }): void; export function sendMessage(socket: WebSocket, channel: Channel, msg: 'pending_transaction', payload: { pending_transactions: Array<Transaction> }): void;
export function sendMessage(socket: WebSocket, channel: Channel, msg: 'new_block', payload: NewBlockSocketResponse): void; export function sendMessage(socket: WebSocket, channel: Channel, msg: 'new_block', payload: NewBlockSocketResponse): void;
export function sendMessage(socket: WebSocket, channel: Channel, msg: 'verification_result', payload: SmartContractVerificationResponse): void; export function sendMessage(socket: WebSocket, channel: Channel, msg: 'verification_result', payload: SmartContractVerificationResponse): void;
export function sendMessage(socket: WebSocket, channel: Channel, msg: 'total_supply', payload: { total_supply: number}): void; export function sendMessage(socket: WebSocket, channel: Channel, msg: 'total_supply', payload: { total_supply: number }): void;
export function sendMessage(socket: WebSocket, channel: Channel, msg: 'changed_bytecode', payload: Record<string, never>): void; export function sendMessage(socket: WebSocket, channel: Channel, msg: 'changed_bytecode', payload: Record<string, never>): void;
export function sendMessage(socket: WebSocket, channel: Channel, msg: 'fetched_bytecode', payload: { fetched_bytecode: string }): void; export function sendMessage(socket: WebSocket, channel: Channel, msg: 'fetched_bytecode', payload: { fetched_bytecode: string }): void;
export function sendMessage(socket: WebSocket, channel: Channel, msg: 'smart_contract_was_verified', payload: Record<string, never>): void; export function sendMessage(socket: WebSocket, channel: Channel, msg: 'smart_contract_was_verified', payload: Record<string, never>): void;
......
...@@ -14,8 +14,9 @@ const NEXT_ROUTER_MOCK = { ...@@ -14,8 +14,9 @@ const NEXT_ROUTER_MOCK = {
beforeMount(async({ hooksConfig }) => { beforeMount(async({ hooksConfig }) => {
// Before mount, redefine useRouter to return mock value from test. // Before mount, redefine useRouter to return mock value from test.
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: I really want to redefine this property :) // @ts-ignore: I really want to redefine this property :)
// eslint-disable-next-line no-import-assign
router.useRouter = () => _defaultsDeep(hooksConfig?.router, NEXT_ROUTER_MOCK); router.useRouter = () => _defaultsDeep(hooksConfig?.router, NEXT_ROUTER_MOCK);
// set current date // set current date
......
...@@ -17,7 +17,7 @@ function getFloatingVariantStylesForSize(size: 'md' | 'lg', props: StyleFunction ...@@ -17,7 +17,7 @@ function getFloatingVariantStylesForSize(size: 'md' | 'lg', props: StyleFunction
const activeLabelStyles = { const activeLabelStyles = {
...FormLabel.variants?.floating?.(props)._focusWithin, ...FormLabel.variants?.floating?.(props)._focusWithin,
...FormLabel.sizes?.[size](props)._focusWithin, ...FormLabel.sizes?.[size](props)._focusWithin,
} || {}; };
const activeInputStyles = (() => { const activeInputStyles = (() => {
switch (size) { switch (size) {
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
"../types/**/*.ts", "../types/**/*.ts",
"../configs/app/**/*.ts", "../configs/app/**/*.ts",
"../global.d.ts", "../global.d.ts",
"./theme.ts" "**/*.ts",
"**/*.pw.tsx"
], ],
"tsc-alias": { "tsc-alias": {
"verbose": true, "verbose": true,
......
export default function getDefaultTransitionProps(props?: {transitionProperty: string}) { export default function getDefaultTransitionProps(props?: { transitionProperty: string }) {
return { return {
transitionProperty: `background-color, color, border-color${ props?.transitionProperty ? ', ' + props.transitionProperty : '' }`, transitionProperty: `background-color, color, border-color${ props?.transitionProperty ? ', ' + props.transitionProperty : '' }`,
transitionDuration: 'normal', transitionDuration: 'normal',
......
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
"incremental": true, "incremental": true,
"baseUrl": ".", "baseUrl": ".",
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.node.ts", "**/*.tsx", "decs.d.ts", "global.d.ts"], "include": ["next-env.d.ts", "**/*.ts", "**/*.node.ts", "**/*.tsx", "**/*.pw.tsx", "decs.d.ts", "global.d.ts"],
"exclude": ["node_modules", "node_modules_linux", "./deploy/tools/envs-validator", "./deploy/tools/favicon-generator"], "exclude": ["node_modules", "node_modules_linux", "./deploy/tools/envs-validator", "./deploy/tools/favicon-generator"],
} }
...@@ -8,7 +8,7 @@ export interface AddressTag { ...@@ -8,7 +8,7 @@ export interface AddressTag {
id: number; id: number;
} }
export type AddressTags = Array<AddressTag> export type AddressTags = Array<AddressTag>;
export type AddressTagsResponse = { export type AddressTagsResponse = {
items: AddressTags; items: AddressTags;
...@@ -16,14 +16,14 @@ export type AddressTagsResponse = { ...@@ -16,14 +16,14 @@ export type AddressTagsResponse = {
id: number; id: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export interface ApiKey { export interface ApiKey {
api_key: string; api_key: string;
name: string; name: string;
} }
export type ApiKeys = Array<ApiKey> export type ApiKeys = Array<ApiKey>;
export interface ModelError { export interface ModelError {
message: string; message: string;
...@@ -57,7 +57,7 @@ export interface TransactionTag { ...@@ -57,7 +57,7 @@ export interface TransactionTag {
id: number; id: number;
} }
export type TransactionTags = Array<TransactionTag> export type TransactionTags = Array<TransactionTag>;
export type TransactionTagsResponse = { export type TransactionTagsResponse = {
items: TransactionTags; items: TransactionTags;
...@@ -65,9 +65,9 @@ export type TransactionTagsResponse = { ...@@ -65,9 +65,9 @@ export type TransactionTagsResponse = {
id: number; id: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export type Transactions = Array<Transaction> export type Transactions = Array<Transaction>;
export interface UserInfo { export interface UserInfo {
name?: string; name?: string;
...@@ -96,7 +96,7 @@ export interface WatchlistAddressNew { ...@@ -96,7 +96,7 @@ export interface WatchlistAddressNew {
notificationSettings: NotificationSettings; notificationSettings: NotificationSettings;
} }
export type WatchlistAddresses = Array<WatchlistAddress> export type WatchlistAddresses = Array<WatchlistAddress>;
export type WatchlistResponse = { export type WatchlistResponse = {
items: WatchlistAddresses; items: WatchlistAddresses;
...@@ -104,9 +104,9 @@ export type WatchlistResponse = { ...@@ -104,9 +104,9 @@ export type WatchlistResponse = {
id: number; id: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export type CustomAbis = Array<CustomAbi> export type CustomAbis = Array<CustomAbi>;
export interface CustomAbi { export interface CustomAbi {
name: string; name: string;
...@@ -120,14 +120,14 @@ export type WatchlistErrors = { ...@@ -120,14 +120,14 @@ export type WatchlistErrors = {
address_hash?: Array<string>; address_hash?: Array<string>;
name?: Array<string>; name?: Array<string>;
watchlist_id?: Array<string>; watchlist_id?: Array<string>;
} };
export type CustomAbiErrors = { export type CustomAbiErrors = {
address_hash?: Array<string>; address_hash?: Array<string>;
name?: Array<string>; name?: Array<string>;
abi?: Array<string>; abi?: Array<string>;
identity_id?: Array<string>; identity_id?: Array<string>;
} };
export type ApiKeyErrors = { export type ApiKeyErrors = {
name?: Array<string>; name?: Array<string>;
...@@ -138,13 +138,13 @@ export type AddressTagErrors = { ...@@ -138,13 +138,13 @@ export type AddressTagErrors = {
address_hash: Array<string>; address_hash: Array<string>;
name: Array<string>; name: Array<string>;
identity_id?: Array<string>; identity_id?: Array<string>;
} };
export type TransactionTagErrors = { export type TransactionTagErrors = {
transaction_hash: Array<string>; transaction_hash: Array<string>;
name: Array<string>; name: Array<string>;
identity_id?: Array<string>; identity_id?: Array<string>;
} };
export interface VerifiedAddress { export interface VerifiedAddress {
userId: string; userId: string;
......
...@@ -50,13 +50,13 @@ export type AddressNFT = TokenInstance & { ...@@ -50,13 +50,13 @@ export type AddressNFT = TokenInstance & {
token: TokenInfo; token: TokenInfo;
token_type: Omit<TokenType, 'ERC-20'>; token_type: Omit<TokenType, 'ERC-20'>;
value: string; value: string;
} };
export type AddressCollection = { export type AddressCollection = {
token: TokenInfo; token: TokenInfo;
amount: string; amount: string;
token_instances: Array<Omit<AddressNFT, 'token'>>; token_instances: Array<Omit<AddressNFT, 'token'>>;
} };
export interface AddressTokensResponse { export interface AddressTokensResponse {
items: Array<AddressTokenBalance>; items: Array<AddressTokenBalance>;
...@@ -107,7 +107,7 @@ export type AddressFromToFilter = typeof AddressFromToFilterValues[number] | und ...@@ -107,7 +107,7 @@ export type AddressFromToFilter = typeof AddressFromToFilterValues[number] | und
export type AddressTxsFilters = { export type AddressTxsFilters = {
filter: AddressFromToFilter; filter: AddressFromToFilter;
} };
export interface AddressTokenTransferResponse { export interface AddressTokenTransferResponse {
items: Array<TokenTransfer>; items: Array<TokenTransfer>;
...@@ -118,15 +118,15 @@ export type AddressTokenTransferFilters = { ...@@ -118,15 +118,15 @@ export type AddressTokenTransferFilters = {
filter?: AddressFromToFilter; filter?: AddressFromToFilter;
type?: Array<TokenType>; type?: Array<TokenType>;
token?: string; token?: string;
} };
export type AddressTokensFilter = { export type AddressTokensFilter = {
type: TokenType; type: TokenType;
} };
export type AddressNFTTokensFilter = { export type AddressNFTTokensFilter = {
type: Array<NFTTokenType> | undefined; type: Array<NFTTokenType> | undefined;
} };
export interface AddressCoinBalanceHistoryItem { export interface AddressCoinBalanceHistoryItem {
block_number: number; block_number: number;
...@@ -175,7 +175,7 @@ export type AddressWithdrawalsResponse = { ...@@ -175,7 +175,7 @@ export type AddressWithdrawalsResponse = {
index: number; index: number;
items_count: number; items_count: number;
}; };
} };
export type AddressWithdrawalsItem = { export type AddressWithdrawalsItem = {
amount: string; amount: string;
...@@ -183,7 +183,7 @@ export type AddressWithdrawalsItem = { ...@@ -183,7 +183,7 @@ export type AddressWithdrawalsItem = {
index: number; index: number;
timestamp: string; timestamp: string;
validator_index: number; validator_index: number;
} };
export type AddressTabsCounters = { export type AddressTabsCounters = {
internal_txs_count: number | null; internal_txs_count: number | null;
...@@ -194,13 +194,13 @@ export type AddressTabsCounters = { ...@@ -194,13 +194,13 @@ export type AddressTabsCounters = {
validations_count: number | null; validations_count: number | null;
withdrawals_count: number | null; withdrawals_count: number | null;
celo_election_rewards_count?: number | null; celo_election_rewards_count?: number | null;
} };
// MUD framework // MUD framework
export type AddressMudTableItem = { export type AddressMudTableItem = {
schema: MudWorldSchema; schema: MudWorldSchema;
table: MudWorldTable; table: MudWorldTable;
} };
export type AddressMudTables = { export type AddressMudTables = {
items: Array<AddressMudTableItem>; items: Array<AddressMudTableItem>;
...@@ -208,11 +208,11 @@ export type AddressMudTables = { ...@@ -208,11 +208,11 @@ export type AddressMudTables = {
items_count: number; items_count: number;
table_id: string; table_id: string;
}; };
} };
export type AddressMudTablesFilter = { export type AddressMudTablesFilter = {
q?: string; q?: string;
} };
export type AddressMudRecords = { export type AddressMudRecords = {
items: Array<AddressMudRecordsItem>; items: Array<AddressMudRecordsItem>;
...@@ -224,30 +224,30 @@ export type AddressMudRecords = { ...@@ -224,30 +224,30 @@ export type AddressMudRecords = {
key1: string; key1: string;
key_bytes: string; key_bytes: string;
}; };
} };
export type AddressMudRecordsItem = { export type AddressMudRecordsItem = {
decoded: Record<string, string | Array<string>>; decoded: Record<string, string | Array<string>>;
id: string; id: string;
is_deleted: boolean; is_deleted: boolean;
timestamp: string; timestamp: string;
} };
export type AddressMudRecordsFilter = { export type AddressMudRecordsFilter = {
filter_key0?: string; filter_key0?: string;
filter_key1?: string; filter_key1?: string;
} };
export type AddressMudRecordsSorting = { export type AddressMudRecordsSorting = {
sort: 'key0' | 'key1'; sort: 'key0' | 'key1';
order: 'asc' | 'desc' | undefined; order: 'asc' | 'desc' | undefined;
} };
export type AddressMudRecord = { export type AddressMudRecord = {
record: AddressMudRecordsItem; record: AddressMudRecordsItem;
schema: MudWorldSchema; schema: MudWorldSchema;
table: MudWorldTable; table: MudWorldTable;
} };
export type AddressEpochRewardsResponse = { export type AddressEpochRewardsResponse = {
items: Array<AddressEpochRewardsItem>; items: Array<AddressEpochRewardsItem>;
...@@ -258,7 +258,7 @@ export type AddressEpochRewardsResponse = { ...@@ -258,7 +258,7 @@ export type AddressEpochRewardsResponse = {
items_count: number; items_count: number;
type: EpochRewardsType; type: EpochRewardsType;
} | null; } | null;
} };
export type AddressEpochRewardsItem = { export type AddressEpochRewardsItem = {
type: EpochRewardsType; type: EpochRewardsType;
...@@ -270,8 +270,8 @@ export type AddressEpochRewardsItem = { ...@@ -270,8 +270,8 @@ export type AddressEpochRewardsItem = {
account: AddressParam; account: AddressParam;
epoch_number: number; epoch_number: number;
associated_account: AddressParam; associated_account: AddressParam;
} };
export type AddressXStarResponse = { export type AddressXStarResponse = {
data: string | null; data: string | null;
} };
...@@ -21,7 +21,7 @@ export type AddressFilecoinParams = { ...@@ -21,7 +21,7 @@ export type AddressFilecoinParams = {
actor_type?: FilecoinActorType; actor_type?: FilecoinActorType;
id?: string | null; id?: string | null;
robust?: string | null; robust?: string | null;
} };
export type FilecoinActorType = export type FilecoinActorType =
'account' | 'account' |
...@@ -59,6 +59,6 @@ export type AddressParamBasic = { ...@@ -59,6 +59,6 @@ export type AddressParamBasic = {
tags: Array<AddressMetadataTagApi>; tags: Array<AddressMetadataTagApi>;
} | null; } | null;
filecoin?: AddressFilecoinParams; filecoin?: AddressFilecoinParams;
} };
export type AddressParam = UserTags & AddressParamBasic; export type AddressParam = UserTags & AddressParamBasic;
import type { AddressParam } from './addressParams'; import type { AddressParam } from './addressParams';
export type AddressesItem = AddressParam & { transaction_count: string; coin_balance: string | null } export type AddressesItem = AddressParam & { transaction_count: string; coin_balance: string | null };
export type AddressesResponse = { export type AddressesResponse = {
items: Array<AddressesItem>; items: Array<AddressesItem>;
...@@ -10,7 +10,7 @@ export type AddressesResponse = { ...@@ -10,7 +10,7 @@ export type AddressesResponse = {
items_count: number; items_count: number;
} | null; } | null;
total_supply: string; total_supply: string;
} };
export interface AddressesMetadataSearchResult { export interface AddressesMetadataSearchResult {
items: Array<AddressesItem>; items: Array<AddressesItem>;
......
...@@ -20,7 +20,7 @@ export type ArbitrumL2MessagesItem = { ...@@ -20,7 +20,7 @@ export type ArbitrumL2MessagesItem = {
origination_transaction_block_number: number | null; origination_transaction_block_number: number | null;
origination_transaction_hash: string; origination_transaction_hash: string;
status: 'initiated' | 'sent' | 'confirmed' | 'relayed'; status: 'initiated' | 'sent' | 'confirmed' | 'relayed';
} };
export type ArbitrumL2MessagesResponse = { export type ArbitrumL2MessagesResponse = {
items: Array<ArbitrumL2MessagesItem>; items: Array<ArbitrumL2MessagesItem>;
...@@ -29,20 +29,20 @@ export type ArbitrumL2MessagesResponse = { ...@@ -29,20 +29,20 @@ export type ArbitrumL2MessagesResponse = {
id: number; id: number;
items_count: number; items_count: number;
}; };
} };
export type ArbitrumL2TxData = { export type ArbitrumL2TxData = {
hash: string | null; hash: string | null;
status: string | null; status: string | null;
timestamp: string | null; timestamp: string | null;
} };
type ArbitrumL2BatchCommitmentTx = { type ArbitrumL2BatchCommitmentTx = {
block_number: number; block_number: number;
hash: string; hash: string;
status: string; status: string;
timestamp: string; timestamp: string;
} };
type BatchDataContainer = 'in_blob4844' | 'in_calldata' | 'in_anytrust' | 'in_celestia' | null; type BatchDataContainer = 'in_blob4844' | 'in_calldata' | 'in_anytrust' | 'in_celestia' | null;
...@@ -52,7 +52,7 @@ export type ArbitrumL2TxnBatchesItem = { ...@@ -52,7 +52,7 @@ export type ArbitrumL2TxnBatchesItem = {
number: number; number: number;
transactions_count: number; transactions_count: number;
batch_data_container: BatchDataContainer; batch_data_container: BatchDataContainer;
} };
export type ArbitrumL2TxnBatchesResponse = { export type ArbitrumL2TxnBatchesResponse = {
items: Array<ArbitrumL2TxnBatchesItem>; items: Array<ArbitrumL2TxnBatchesItem>;
...@@ -60,7 +60,7 @@ export type ArbitrumL2TxnBatchesResponse = { ...@@ -60,7 +60,7 @@ export type ArbitrumL2TxnBatchesResponse = {
number: number; number: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export type ArbitrumL2TxnBatchDAAnytrust = { export type ArbitrumL2TxnBatchDAAnytrust = {
batch_data_container: 'in_anytrust'; batch_data_container: 'in_anytrust';
...@@ -72,11 +72,11 @@ export type ArbitrumL2TxnBatchDAAnytrust = { ...@@ -72,11 +72,11 @@ export type ArbitrumL2TxnBatchDAAnytrust = {
trusted: boolean; trusted: boolean;
proof?: string; proof?: string;
}>; }>;
} };
export type ArbitrumL2TxnBatchDataAvailability = ArbitrumL2TxnBatchDAAnytrust | { export type ArbitrumL2TxnBatchDataAvailability = ArbitrumL2TxnBatchDAAnytrust | {
batch_data_container: Exclude<BatchDataContainer, 'in_anytrust'>; batch_data_container: Exclude<BatchDataContainer, 'in_anytrust'>;
} };
export type ArbitrumL2TxnBatch = { export type ArbitrumL2TxnBatch = {
after_acc: string; after_acc: string;
...@@ -87,7 +87,7 @@ export type ArbitrumL2TxnBatch = { ...@@ -87,7 +87,7 @@ export type ArbitrumL2TxnBatch = {
number: number; number: number;
transactions_count: number; transactions_count: number;
data_availability: ArbitrumL2TxnBatchDataAvailability; data_availability: ArbitrumL2TxnBatchDataAvailability;
} };
export type ArbitrumL2BatchTxs = { export type ArbitrumL2BatchTxs = {
items: Array<Transaction>; items: Array<Transaction>;
...@@ -97,7 +97,7 @@ export type ArbitrumL2BatchTxs = { ...@@ -97,7 +97,7 @@ export type ArbitrumL2BatchTxs = {
index: number; index: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export type ArbitrumL2BatchBlocks = { export type ArbitrumL2BatchBlocks = {
items: Array<Block>; items: Array<Block>;
...@@ -106,7 +106,7 @@ export type ArbitrumL2BatchBlocks = { ...@@ -106,7 +106,7 @@ export type ArbitrumL2BatchBlocks = {
block_number: number; block_number: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export const ARBITRUM_L2_TX_BATCH_STATUSES = [ export const ARBITRUM_L2_TX_BATCH_STATUSES = [
'Processed on rollup' as const, 'Processed on rollup' as const,
...@@ -116,4 +116,4 @@ export const ARBITRUM_L2_TX_BATCH_STATUSES = [ ...@@ -116,4 +116,4 @@ export const ARBITRUM_L2_TX_BATCH_STATUSES = [
export type ArbitrumBatchStatus = typeof ARBITRUM_L2_TX_BATCH_STATUSES[number]; export type ArbitrumBatchStatus = typeof ARBITRUM_L2_TX_BATCH_STATUSES[number];
export type NewArbitrumBatchSocketResponse = { batch: ArbitrumL2TxnBatchesItem } export type NewArbitrumBatchSocketResponse = { batch: ArbitrumL2TxnBatchesItem };
...@@ -57,7 +57,7 @@ export interface Block { ...@@ -57,7 +57,7 @@ export interface Block {
blob_tx_count?: number; blob_tx_count?: number;
// ZKSYNC FIELDS // ZKSYNC FIELDS
zksync?: Omit<ZkSyncBatchesItem, 'number' | 'transaction_count' | 'timestamp'> & { zksync?: Omit<ZkSyncBatchesItem, 'number' | 'transaction_count' | 'timestamp'> & {
'batch_number': number | null; batch_number: number | null;
}; };
arbitrum?: ArbitrumBlockData; arbitrum?: ArbitrumBlockData;
optimism?: OptimismBlockData; optimism?: OptimismBlockData;
...@@ -70,15 +70,15 @@ export interface Block { ...@@ -70,15 +70,15 @@ export interface Block {
} }
type ArbitrumBlockData = { type ArbitrumBlockData = {
'batch_number': number; batch_number: number;
'commitment_transaction': ArbitrumL2TxData; commitment_transaction: ArbitrumL2TxData;
'confirmation_transaction': ArbitrumL2TxData; confirmation_transaction: ArbitrumL2TxData;
'delayed_messages': number; delayed_messages: number;
'l1_block_height': number; l1_block_height: number;
'send_count': number; send_count: number;
'send_root': string; send_root: string;
'status': ArbitrumBatchStatus; status: ArbitrumBatchStatus;
} };
export interface OptimismBlockData { export interface OptimismBlockData {
batch_data_container: OptimisticL2BatchDataContainer; batch_data_container: OptimisticL2BatchDataContainer;
...@@ -120,14 +120,14 @@ export type BlockWithdrawalsResponse = { ...@@ -120,14 +120,14 @@ export type BlockWithdrawalsResponse = {
index: number; index: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export type BlockWithdrawalsItem = { export type BlockWithdrawalsItem = {
amount: string; amount: string;
index: number; index: number;
receiver: AddressParam; receiver: AddressParam;
validator_index: number; validator_index: number;
} };
export interface BlockCountdownResponse { export interface BlockCountdownResponse {
result: { result: {
......
...@@ -81,8 +81,8 @@ export type SmartContractDecodedConstructorArg = [ ...@@ -81,8 +81,8 @@ export type SmartContractDecodedConstructorArg = [
internalType: SmartContractMethodArgType; internalType: SmartContractMethodArgType;
name: string; name: string;
type: SmartContractMethodArgType; type: SmartContractMethodArgType;
} },
] ];
export interface SmartContractExternalLibrary { export interface SmartContractExternalLibrary {
address_hash: string; address_hash: string;
...@@ -111,7 +111,7 @@ export type SmartContractVerificationResponse = { ...@@ -111,7 +111,7 @@ export type SmartContractVerificationResponse = {
errors: SmartContractVerificationError; errors: SmartContractVerificationError;
} | { } | {
status: 'success'; status: 'success';
} };
export interface SmartContractVerificationError { export interface SmartContractVerificationError {
contract_source_code?: Array<string>; contract_source_code?: Array<string>;
...@@ -126,24 +126,24 @@ type SmartContractSecurityAudit = { ...@@ -126,24 +126,24 @@ type SmartContractSecurityAudit = {
audit_company_name: string; audit_company_name: string;
audit_publish_date: string; audit_publish_date: string;
audit_report_url: string; audit_report_url: string;
} };
export type SmartContractSecurityAudits = { export type SmartContractSecurityAudits = {
items: Array<SmartContractSecurityAudit>; items: Array<SmartContractSecurityAudit>;
} };
export type SmartContractSecurityAuditSubmission = { export type SmartContractSecurityAuditSubmission = {
'address_hash': string; address_hash: string;
'submitter_name': string; submitter_name: string;
'submitter_email': string; submitter_email: string;
'is_project_owner': boolean; is_project_owner: boolean;
'project_name': string; project_name: string;
'project_url': string; project_url: string;
'audit_company_name': string; audit_company_name: string;
'audit_report_url': string; audit_report_url: string;
'audit_publish_date': string; audit_publish_date: string;
'comment'?: string; comment?: string;
} };
// MUD SYSTEM // MUD SYSTEM
......
...@@ -34,4 +34,4 @@ export type VerifiedContractsCounters = { ...@@ -34,4 +34,4 @@ export type VerifiedContractsCounters = {
new_verified_smart_contracts_24h: string; new_verified_smart_contracts_24h: string;
smart_contracts: string; smart_contracts: string;
verified_smart_contracts: string; verified_smart_contracts: string;
} };
...@@ -3,4 +3,4 @@ export type IndexingStatus = { ...@@ -3,4 +3,4 @@ export type IndexingStatus = {
finished_indexing_blocks: boolean; finished_indexing_blocks: boolean;
indexed_blocks_ratio: string; indexed_blocks_ratio: string;
indexed_internal_transactions_ratio: string; indexed_internal_transactions_ratio: string;
} };
import type { AddressParam } from './addressParams'; import type { AddressParam } from './addressParams';
export type TxInternalsType = 'call' | 'delegatecall' | 'staticcall' | 'create' | 'create2' | 'selfdestruct' | 'reward' export type TxInternalsType = 'call' | 'delegatecall' | 'staticcall' | 'create' | 'create2' | 'selfdestruct' | 'reward';
export type InternalTransaction = ( export type InternalTransaction = (
{ {
...@@ -22,7 +22,7 @@ export type InternalTransaction = ( ...@@ -22,7 +22,7 @@ export type InternalTransaction = (
block: number; block: number;
timestamp: string; timestamp: string;
gas_limit: string; gas_limit: string;
} };
export interface InternalTransactionsResponse { export interface InternalTransactionsResponse {
items: Array<InternalTransaction>; items: Array<InternalTransaction>;
......
...@@ -6,13 +6,13 @@ export type MudWorldsResponse = { ...@@ -6,13 +6,13 @@ export type MudWorldsResponse = {
items_count: number; items_count: number;
world: string; world: string;
}; };
} };
export type MudWorldItem = { export type MudWorldItem = {
address: AddressParam; address: AddressParam;
coin_balance: string; coin_balance: string;
transaction_count: number | null; transaction_count: number | null;
} };
export type MudWorldSchema = { export type MudWorldSchema = {
key_names: Array<string>; key_names: Array<string>;
...@@ -27,4 +27,4 @@ export type MudWorldTable = { ...@@ -27,4 +27,4 @@ export type MudWorldTable = {
table_name: string; table_name: string;
table_namespace: string; table_namespace: string;
table_type: string; table_type: string;
} };
...@@ -113,11 +113,11 @@ export interface NovesDescribeResponse { ...@@ -113,11 +113,11 @@ export interface NovesDescribeResponse {
description: string; description: string;
} }
export interface NovesDescribeTxsResponse { export type NovesDescribeTxsResponse = {
txHash: string; txHash: string;
type: string; type: string;
description: string; description: string;
}[]; };
export interface NovesTxTranslation { export interface NovesTxTranslation {
data?: NovesDescribeTxsResponse; data?: NovesDescribeTxsResponse;
......
...@@ -9,7 +9,7 @@ export type OptimisticL2DepositsItem = { ...@@ -9,7 +9,7 @@ export type OptimisticL2DepositsItem = {
l1_transaction_origin: string; l1_transaction_origin: string;
l2_transaction_gas_limit: string; l2_transaction_gas_limit: string;
l2_transaction_hash: string; l2_transaction_hash: string;
} };
export type OptimisticL2DepositsResponse = { export type OptimisticL2DepositsResponse = {
items: Array<OptimisticL2DepositsItem>; items: Array<OptimisticL2DepositsItem>;
...@@ -18,7 +18,7 @@ export type OptimisticL2DepositsResponse = { ...@@ -18,7 +18,7 @@ export type OptimisticL2DepositsResponse = {
l1_block_number: number; l1_block_number: number;
transaction_hash: string; transaction_hash: string;
}; };
} };
export type OptimisticL2OutputRootsItem = { export type OptimisticL2OutputRootsItem = {
l1_block_number: number; l1_block_number: number;
...@@ -27,7 +27,7 @@ export type OptimisticL2OutputRootsItem = { ...@@ -27,7 +27,7 @@ export type OptimisticL2OutputRootsItem = {
l2_block_number: number; l2_block_number: number;
l2_output_index: number; l2_output_index: number;
output_root: string; output_root: string;
} };
export type OptimisticL2OutputRootsResponse = { export type OptimisticL2OutputRootsResponse = {
items: Array<OptimisticL2OutputRootsItem>; items: Array<OptimisticL2OutputRootsItem>;
...@@ -35,7 +35,7 @@ export type OptimisticL2OutputRootsResponse = { ...@@ -35,7 +35,7 @@ export type OptimisticL2OutputRootsResponse = {
index: number; index: number;
items_count: number; items_count: number;
}; };
} };
export type OptimisticL2BatchDataContainer = 'in_blob4844' | 'in_celestia' | 'in_calldata'; export type OptimisticL2BatchDataContainer = 'in_blob4844' | 'in_celestia' | 'in_calldata';
...@@ -47,7 +47,7 @@ export type OptimisticL2TxnBatchesItem = { ...@@ -47,7 +47,7 @@ export type OptimisticL2TxnBatchesItem = {
l2_block_start: number; l2_block_start: number;
l2_block_end: number; l2_block_end: number;
transaction_count: number; transaction_count: number;
} };
export type OptimisticL2TxnBatchesResponse = { export type OptimisticL2TxnBatchesResponse = {
items: Array<OptimisticL2TxnBatchesItem>; items: Array<OptimisticL2TxnBatchesItem>;
...@@ -55,7 +55,7 @@ export type OptimisticL2TxnBatchesResponse = { ...@@ -55,7 +55,7 @@ export type OptimisticL2TxnBatchesResponse = {
id: number; id: number;
items_count: number; items_count: number;
}; };
} };
export interface OptimisticL2BlobTypeEip4844 { export interface OptimisticL2BlobTypeEip4844 {
hash: string; hash: string;
...@@ -103,7 +103,7 @@ export type OptimismL2BatchTxs = { ...@@ -103,7 +103,7 @@ export type OptimismL2BatchTxs = {
index: number; index: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export type OptimismL2BatchBlocks = { export type OptimismL2BatchBlocks = {
items: Array<Block>; items: Array<Block>;
...@@ -111,18 +111,18 @@ export type OptimismL2BatchBlocks = { ...@@ -111,18 +111,18 @@ export type OptimismL2BatchBlocks = {
batch_number: number; batch_number: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export type OptimisticL2WithdrawalsItem = { export type OptimisticL2WithdrawalsItem = {
'challenge_period_end': string | null; challenge_period_end: string | null;
'from': AddressParam | null; from: AddressParam | null;
'l1_transaction_hash': string | null; l1_transaction_hash: string | null;
'l2_timestamp': string | null; l2_timestamp: string | null;
'l2_transaction_hash': string; l2_transaction_hash: string;
'msg_nonce': number; msg_nonce: number;
'msg_nonce_version': number; msg_nonce_version: number;
'status': string; status: string;
} };
export type OptimisticL2WithdrawalStatus = export type OptimisticL2WithdrawalStatus =
'Waiting for state root' | 'Waiting for state root' |
...@@ -136,19 +136,19 @@ export type OptimisticL2WithdrawalStatus = ...@@ -136,19 +136,19 @@ export type OptimisticL2WithdrawalStatus =
export type OptimisticL2WithdrawalsResponse = { export type OptimisticL2WithdrawalsResponse = {
items: Array<OptimisticL2WithdrawalsItem>; items: Array<OptimisticL2WithdrawalsItem>;
'next_page_params': { next_page_params: {
'items_count': number; items_count: number;
'nonce': string; nonce: string;
}; };
} };
export type OptimisticL2DisputeGamesResponse = { export type OptimisticL2DisputeGamesResponse = {
items: Array<OptimisticL2DisputeGamesItem>; items: Array<OptimisticL2DisputeGamesItem>;
'next_page_params': { next_page_params: {
'items_count': number; items_count: number;
'index': number; index: number;
}; };
} };
export type OptimisticL2DisputeGamesItem = { export type OptimisticL2DisputeGamesItem = {
contract_address: string; contract_address: string;
...@@ -158,4 +158,4 @@ export type OptimisticL2DisputeGamesItem = { ...@@ -158,4 +158,4 @@ export type OptimisticL2DisputeGamesItem = {
l2_block_number: number; l2_block_number: number;
resolved_at: string | null; resolved_at: string | null;
status: string; status: string;
} };
...@@ -93,15 +93,15 @@ SearchResultBlob | SearchResultDomain; ...@@ -93,15 +93,15 @@ SearchResultBlob | SearchResultDomain;
export interface SearchResult { export interface SearchResult {
items: Array<SearchResultItem>; items: Array<SearchResultItem>;
next_page_params: { next_page_params: {
'address_hash': string | null; address_hash: string | null;
'block_hash': string | null; block_hash: string | null;
'holder_count': number | null; holder_count: number | null;
'inserted_at': string | null; inserted_at: string | null;
'item_type': SearchResultType; item_type: SearchResultType;
'items_count': number; items_count: number;
'name': string; name: string;
'q': string; q: string;
'transaction_hash': string | null; transaction_hash: string | null;
} | null; } | null;
} }
......
...@@ -6,7 +6,7 @@ export type ShibariumDepositsItem = { ...@@ -6,7 +6,7 @@ export type ShibariumDepositsItem = {
l2_transaction_hash: string; l2_transaction_hash: string;
timestamp: string; timestamp: string;
user: AddressParam | string; user: AddressParam | string;
} };
export type ShibariumDepositsResponse = { export type ShibariumDepositsResponse = {
items: Array<ShibariumDepositsItem>; items: Array<ShibariumDepositsItem>;
...@@ -14,7 +14,7 @@ export type ShibariumDepositsResponse = { ...@@ -14,7 +14,7 @@ export type ShibariumDepositsResponse = {
items_count: number; items_count: number;
block_number: number; block_number: number;
}; };
} };
export type ShibariumWithdrawalsItem = { export type ShibariumWithdrawalsItem = {
l1_transaction_hash: string; l1_transaction_hash: string;
...@@ -22,7 +22,7 @@ export type ShibariumWithdrawalsItem = { ...@@ -22,7 +22,7 @@ export type ShibariumWithdrawalsItem = {
l2_transaction_hash: string; l2_transaction_hash: string;
timestamp: string; timestamp: string;
user: AddressParam | string; user: AddressParam | string;
} };
export type ShibariumWithdrawalsResponse = { export type ShibariumWithdrawalsResponse = {
items: Array<ShibariumWithdrawalsItem>; items: Array<ShibariumWithdrawalsItem>;
...@@ -30,4 +30,4 @@ export type ShibariumWithdrawalsResponse = { ...@@ -30,4 +30,4 @@ export type ShibariumWithdrawalsResponse = {
items_count: number; items_count: number;
block_number: number; block_number: number;
}; };
} };
...@@ -23,13 +23,13 @@ export type HomeStats = { ...@@ -23,13 +23,13 @@ export type HomeStats = {
celo?: { celo?: {
epoch_number: number; epoch_number: number;
}; };
} };
export type GasPrices = { export type GasPrices = {
average: GasPriceInfo | null; average: GasPriceInfo | null;
fast: GasPriceInfo | null; fast: GasPriceInfo | null;
slow: GasPriceInfo | null; slow: GasPriceInfo | null;
} };
export interface GasPriceInfo { export interface GasPriceInfo {
fiat_price: string | null; fiat_price: string | null;
......
...@@ -38,18 +38,18 @@ export type TokenHolder = TokenHolderERC20ERC721 | TokenHolderERC1155; ...@@ -38,18 +38,18 @@ export type TokenHolder = TokenHolderERC20ERC721 | TokenHolderERC1155;
export type TokenHolderBase = { export type TokenHolderBase = {
address: AddressParam; address: AddressParam;
value: string; value: string;
} };
export type TokenHolderERC20ERC721 = TokenHolderBase export type TokenHolderERC20ERC721 = TokenHolderBase;
export type TokenHolderERC1155 = TokenHolderBase & { export type TokenHolderERC1155 = TokenHolderBase & {
token_id: string; token_id: string;
} };
export type TokenHoldersPagination = { export type TokenHoldersPagination = {
items_count: number; items_count: number;
value: string; value: string;
} };
export interface TokenInstance { export interface TokenInstance {
is_unique: boolean; is_unique: boolean;
...@@ -78,10 +78,10 @@ export interface TokenInventoryResponse { ...@@ -78,10 +78,10 @@ export interface TokenInventoryResponse {
export type TokenInventoryPagination = { export type TokenInventoryPagination = {
unique_token: number; unique_token: number;
} };
export type TokenVerifiedInfo = Omit<TokenInfoApplication, 'id' | 'status'>; export type TokenVerifiedInfo = Omit<TokenInfoApplication, 'id' | 'status'>;
export type TokenInventoryFilters = { export type TokenInventoryFilters = {
holder_address_hash?: string; holder_address_hash?: string;
} };
...@@ -4,17 +4,17 @@ import type { TokenInfo, TokenType } from './token'; ...@@ -4,17 +4,17 @@ import type { TokenInfo, TokenType } from './token';
export type Erc20TotalPayload = { export type Erc20TotalPayload = {
decimals: string | null; decimals: string | null;
value: string; value: string;
} };
export type Erc721TotalPayload = { export type Erc721TotalPayload = {
token_id: string | null; token_id: string | null;
} };
export type Erc1155TotalPayload = { export type Erc1155TotalPayload = {
decimals: string | null; decimals: string | null;
value: string; value: string;
token_id: string | null; token_id: string | null;
} };
export type Erc404TotalPayload = { export type Erc404TotalPayload = {
decimals: string; decimals: string;
...@@ -41,7 +41,7 @@ export type TokenTransfer = ( ...@@ -41,7 +41,7 @@ export type TokenTransfer = (
token: TokenInfo<'ERC-404'>; token: TokenInfo<'ERC-404'>;
total: Erc404TotalPayload | null; total: Erc404TotalPayload | null;
} }
) & TokenTransferBase ) & TokenTransferBase;
export type TokenTotal = Erc20TotalPayload | Erc721TotalPayload | Erc1155TotalPayload; export type TokenTotal = Erc20TotalPayload | Erc721TotalPayload | Erc1155TotalPayload;
...@@ -61,7 +61,7 @@ export type TokenTransferPagination = { ...@@ -61,7 +61,7 @@ export type TokenTransferPagination = {
block_number: number; block_number: number;
index: number; index: number;
items_count: number; items_count: number;
} };
export interface TokenTransferResponse { export interface TokenTransferResponse {
items: Array<TokenTransfer>; items: Array<TokenTransfer>;
......
...@@ -9,7 +9,7 @@ export type TokensResponse = { ...@@ -9,7 +9,7 @@ export type TokensResponse = {
name: string; name: string;
market_cap: string | null; market_cap: string | null;
} | null; } | null;
} };
export type TokensFilters = { q: string; type: Array<TokenType> | undefined }; export type TokensFilters = { q: string; type: Array<TokenType> | undefined };
......
...@@ -88,7 +88,7 @@ export type Transaction = { ...@@ -88,7 +88,7 @@ export type Transaction = {
zkevm_sequence_hash?: string; zkevm_sequence_hash?: string;
// zkSync FIELDS // zkSync FIELDS
zksync?: Omit<ZkSyncBatchesItem, 'number' | 'transaction_count' | 'timestamp'> & { zksync?: Omit<ZkSyncBatchesItem, 'number' | 'transaction_count' | 'timestamp'> & {
'batch_number': number | null; batch_number: number | null;
}; };
// blob tx fields // blob tx fields
blob_versioned_hashes?: Array<string>; blob_versioned_hashes?: Array<string>;
...@@ -99,7 +99,7 @@ export type Transaction = { ...@@ -99,7 +99,7 @@ export type Transaction = {
// Noves-fi // Noves-fi
translation?: NovesTxTranslation; translation?: NovesTxTranslation;
arbitrum?: ArbitrumTransactionData; arbitrum?: ArbitrumTransactionData;
} };
type ArbitrumTransactionData = { type ArbitrumTransactionData = {
batch_number: number; batch_number: number;
...@@ -115,7 +115,7 @@ type ArbitrumTransactionData = { ...@@ -115,7 +115,7 @@ type ArbitrumTransactionData = {
associated_l1_transaction: string | null; associated_l1_transaction: string | null;
message_status: ArbitrumMessageStatus; message_status: ArbitrumMessageStatus;
}; };
} };
export type ArbitrumMessageStatus = 'Relayed' | 'Syncing with base layer' | 'Waiting for confirmation' | 'Ready for relay' | 'Settlement pending'; export type ArbitrumMessageStatus = 'Relayed' | 'Syncing with base layer' | 'Waiting for confirmation' | 'Ready for relay' | 'Settlement pending';
...@@ -174,7 +174,7 @@ export type TransactionType = 'rootstock_remasc' | ...@@ -174,7 +174,7 @@ export type TransactionType = 'rootstock_remasc' |
'contract_call' | 'contract_call' |
'token_creation' | 'token_creation' |
'coin_transfer' | 'coin_transfer' |
'blob_transaction' 'blob_transaction';
export type TxsResponse = TransactionsResponseValidated | TransactionsResponsePending | BlockTransactionsResponse; export type TxsResponse = TransactionsResponseValidated | TransactionsResponsePending | BlockTransactionsResponse;
......
...@@ -23,4 +23,4 @@ export interface TxActionNft { ...@@ -23,4 +23,4 @@ export interface TxActionNft {
export type TxAction = { export type TxAction = {
protocol: 'uniswap_v3'; protocol: 'uniswap_v3';
} & (TxActionGeneral | TxActionNft) } & (TxActionGeneral | TxActionNft);
...@@ -10,7 +10,7 @@ export interface TxInterpretationResponse { ...@@ -10,7 +10,7 @@ export interface TxInterpretationResponse {
export type TxInterpretationSummary = { export type TxInterpretationSummary = {
summary_template: string; summary_template: string;
summary_template_variables: Record<string, TxInterpretationVariable>; summary_template_variables: Record<string, TxInterpretationVariable>;
} };
export type TxInterpretationVariable = export type TxInterpretationVariable =
TxInterpretationVariableString | TxInterpretationVariableString |
...@@ -26,34 +26,34 @@ export type TxInterpretationVariableType = 'string' | 'currency' | 'timestamp' | ...@@ -26,34 +26,34 @@ export type TxInterpretationVariableType = 'string' | 'currency' | 'timestamp' |
export type TxInterpretationVariableString = { export type TxInterpretationVariableString = {
type: 'string'; type: 'string';
value: string; value: string;
} };
export type TxInterpretationVariableCurrency = { export type TxInterpretationVariableCurrency = {
type: 'currency'; type: 'currency';
value: string; value: string;
} };
export type TxInterpretationVariableTimestamp = { export type TxInterpretationVariableTimestamp = {
type: 'timestamp'; type: 'timestamp';
value: string; value: string;
} };
export type TxInterpretationVariableToken = { export type TxInterpretationVariableToken = {
type: 'token'; type: 'token';
value: TokenInfo; value: TokenInfo;
} };
export type TxInterpretationVariableAddress = { export type TxInterpretationVariableAddress = {
type: 'address'; type: 'address';
value: AddressParam; value: AddressParam;
} };
export type TxInterpretationVariableDomain = { export type TxInterpretationVariableDomain = {
type: 'domain'; type: 'domain';
value: string; value: string;
} };
export type TxInterpretationVariableMethod = { export type TxInterpretationVariableMethod = {
type: 'method'; type: 'method';
value: string; value: string;
} };
...@@ -7,7 +7,7 @@ export type TxStateChange = (TxStateChangeCoin | TxStateChangeToken) & { ...@@ -7,7 +7,7 @@ export type TxStateChange = (TxStateChangeCoin | TxStateChangeToken) & {
is_miner: boolean; is_miner: boolean;
balance_before: string | null; balance_before: string | null;
balance_after: string | null; balance_after: string | null;
} };
export interface TxStateChangeCoin { export interface TxStateChangeCoin {
type: 'coin'; type: 'coin';
......
...@@ -2,11 +2,11 @@ export type TTxsFilters = { ...@@ -2,11 +2,11 @@ export type TTxsFilters = {
filter: 'pending' | 'validated'; filter: 'pending' | 'validated';
type?: Array<TypeFilter>; type?: Array<TypeFilter>;
method?: Array<MethodFilter>; method?: Array<MethodFilter>;
} };
export type TTxsWithBlobsFilters = { export type TTxsWithBlobsFilters = {
type: 'blob_transaction'; type: 'blob_transaction';
} };
export type TypeFilter = 'token_transfer' | 'contract_creation' | 'contract_call' | 'coin_transfer' | 'token_creation' | 'blob_transaction'; export type TypeFilter = 'token_transfer' | 'contract_creation' | 'contract_call' | 'coin_transfer' | 'token_creation' | 'blob_transaction';
......
...@@ -9,7 +9,7 @@ export type UserOpsItem = { ...@@ -9,7 +9,7 @@ export type UserOpsItem = {
timestamp: string; timestamp: string;
status: boolean; status: boolean;
fee: string; fee: string;
} };
export type UserOpsResponse = { export type UserOpsResponse = {
items: Array<UserOpsItem>; items: Array<UserOpsItem>;
...@@ -17,7 +17,7 @@ export type UserOpsResponse = { ...@@ -17,7 +17,7 @@ export type UserOpsResponse = {
page_token: string; page_token: string;
page_size: number; page_size: number;
} | null; } | null;
} };
export type UserOpSponsorType = 'paymaster_hybrid' | 'paymaster_sponsor' | 'wallet_balance' | 'wallet_deposit'; export type UserOpSponsorType = 'paymaster_hybrid' | 'paymaster_sponsor' | 'wallet_balance' | 'wallet_deposit';
...@@ -69,13 +69,13 @@ export type UserOp = { ...@@ -69,13 +69,13 @@ export type UserOp = {
}; };
gas_price: string; gas_price: string;
gas_used: string; gas_used: string;
} };
export type UserOpsFilters = { export type UserOpsFilters = {
transaction_hash?: string; transaction_hash?: string;
sender?: string; sender?: string;
} };
export type UserOpsAccount = { export type UserOpsAccount = {
total_ops: number; total_ops: number;
} };
...@@ -9,10 +9,10 @@ export interface ValidatorStability { ...@@ -9,10 +9,10 @@ export interface ValidatorStability {
export interface ValidatorsStabilityResponse { export interface ValidatorsStabilityResponse {
items: Array<ValidatorStability>; items: Array<ValidatorStability>;
next_page_params: { next_page_params: {
'address_hash': string; address_hash: string;
'blocks_validated': string; blocks_validated: string;
'items_count': string; items_count: string;
'state': ValidatorStability['state']; state: ValidatorStability['state'];
} | null; } | null;
} }
...@@ -48,7 +48,7 @@ export interface ValidatorBlackfort { ...@@ -48,7 +48,7 @@ export interface ValidatorBlackfort {
export interface ValidatorsBlackfortResponse { export interface ValidatorsBlackfortResponse {
items: Array<ValidatorBlackfort>; items: Array<ValidatorBlackfort>;
next_page_params: { next_page_params: {
'address_hash': string; address_hash: string;
} | null; } | null;
} }
......
...@@ -6,7 +6,7 @@ export type WithdrawalsResponse = { ...@@ -6,7 +6,7 @@ export type WithdrawalsResponse = {
index: number; index: number;
items_count: number; items_count: number;
}; };
} };
export type WithdrawalsItem = { export type WithdrawalsItem = {
amount: string; amount: string;
...@@ -15,9 +15,9 @@ export type WithdrawalsItem = { ...@@ -15,9 +15,9 @@ export type WithdrawalsItem = {
receiver: AddressParam; receiver: AddressParam;
timestamp: string; timestamp: string;
validator_index: number; validator_index: number;
} };
export type WithdrawalsCounters = { export type WithdrawalsCounters = {
withdrawal_count: string; withdrawal_count: string;
withdrawal_sum: string; withdrawal_sum: string;
} };
...@@ -8,7 +8,7 @@ export type ZkEvmL2DepositsItem = { ...@@ -8,7 +8,7 @@ export type ZkEvmL2DepositsItem = {
timestamp: string; timestamp: string;
value: string; value: string;
symbol: string; symbol: string;
} };
export type ZkEvmL2DepositsResponse = { export type ZkEvmL2DepositsResponse = {
items: Array<ZkEvmL2DepositsItem>; items: Array<ZkEvmL2DepositsItem>;
...@@ -16,7 +16,7 @@ export type ZkEvmL2DepositsResponse = { ...@@ -16,7 +16,7 @@ export type ZkEvmL2DepositsResponse = {
items_count: number; items_count: number;
index: number; index: number;
}; };
} };
export type ZkEvmL2WithdrawalsItem = { export type ZkEvmL2WithdrawalsItem = {
block_number: number; block_number: number;
...@@ -26,7 +26,7 @@ export type ZkEvmL2WithdrawalsItem = { ...@@ -26,7 +26,7 @@ export type ZkEvmL2WithdrawalsItem = {
timestamp: string; timestamp: string;
value: string; value: string;
symbol: string; symbol: string;
} };
export type ZkEvmL2WithdrawalsResponse = { export type ZkEvmL2WithdrawalsResponse = {
items: Array<ZkEvmL2WithdrawalsItem>; items: Array<ZkEvmL2WithdrawalsItem>;
...@@ -34,7 +34,7 @@ export type ZkEvmL2WithdrawalsResponse = { ...@@ -34,7 +34,7 @@ export type ZkEvmL2WithdrawalsResponse = {
items_count: number; items_count: number;
index: number; index: number;
}; };
} };
export type ZkEvmL2TxnBatchesItem = { export type ZkEvmL2TxnBatchesItem = {
number: number; number: number;
...@@ -43,7 +43,7 @@ export type ZkEvmL2TxnBatchesItem = { ...@@ -43,7 +43,7 @@ export type ZkEvmL2TxnBatchesItem = {
status: string; status: string;
timestamp: string | null; timestamp: string | null;
transaction_count: number; transaction_count: number;
} };
export type ZkEvmL2TxnBatchesResponse = { export type ZkEvmL2TxnBatchesResponse = {
items: Array<ZkEvmL2TxnBatchesItem>; items: Array<ZkEvmL2TxnBatchesItem>;
...@@ -51,7 +51,7 @@ export type ZkEvmL2TxnBatchesResponse = { ...@@ -51,7 +51,7 @@ export type ZkEvmL2TxnBatchesResponse = {
number: number; number: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export const ZKEVM_L2_TX_BATCH_STATUSES = [ 'Unfinalized', 'L1 Sequence Confirmed', 'Finalized' ]; export const ZKEVM_L2_TX_BATCH_STATUSES = [ 'Unfinalized', 'L1 Sequence Confirmed', 'Finalized' ];
...@@ -65,12 +65,12 @@ export type ZkEvmL2TxnBatch = { ...@@ -65,12 +65,12 @@ export type ZkEvmL2TxnBatch = {
timestamp: string | null; timestamp: string | null;
transactions: Array<string>; transactions: Array<string>;
verify_transaction_hash: string; verify_transaction_hash: string;
} };
export type ZkEvmL2TxnBatchTxs = { export type ZkEvmL2TxnBatchTxs = {
items: Array<Transaction>; items: Array<Transaction>;
// API responce doesn't have next_page_params option, but we need to add it to the type for consistency // API responce doesn't have next_page_params option, but we need to add it to the type for consistency
next_page_params: null; next_page_params: null;
} };
export type NewZkEvmBatchSocketResponse = { batch: ZkEvmL2TxnBatchesItem }; export type NewZkEvmBatchSocketResponse = { batch: ZkEvmL2TxnBatchesItem };
...@@ -29,7 +29,7 @@ export type ZkSyncBatchesResponse = { ...@@ -29,7 +29,7 @@ export type ZkSyncBatchesResponse = {
number: number; number: number;
items_count: number; items_count: number;
} | null; } | null;
} };
export interface ZkSyncBatch extends Omit<ZkSyncBatchesItem, 'transaction_count'> { export interface ZkSyncBatch extends Omit<ZkSyncBatchesItem, 'transaction_count'> {
start_block: number; start_block: number;
...@@ -49,4 +49,4 @@ export type ZkSyncBatchTxs = { ...@@ -49,4 +49,4 @@ export type ZkSyncBatchTxs = {
index: number; index: number;
items_count: number; items_count: number;
} | null; } | null;
} };
...@@ -2,4 +2,4 @@ export type AdButlerConfig = { ...@@ -2,4 +2,4 @@ export type AdButlerConfig = {
id: string; id: string;
width: string; width: string;
height: string; height: string;
} };
...@@ -12,4 +12,4 @@ export type CsvExportParams = { ...@@ -12,4 +12,4 @@ export type CsvExportParams = {
type: 'holders'; type: 'holders';
filterType?: undefined; filterType?: undefined;
filterValue?: undefined; filterValue?: undefined;
} };
...@@ -11,31 +11,31 @@ export type MarketplaceAppPreview = { ...@@ -11,31 +11,31 @@ export type MarketplaceAppPreview = {
url: string; url: string;
internalWallet?: boolean; internalWallet?: boolean;
priority?: number; priority?: number;
} };
export type MarketplaceAppSocialInfo = { export type MarketplaceAppSocialInfo = {
twitter?: string; twitter?: string;
telegram?: string; telegram?: string;
github?: string | Array<string>; github?: string | Array<string>;
discord?: string; discord?: string;
} };
export type MarketplaceAppOverview = MarketplaceAppPreview & MarketplaceAppSocialInfo & { export type MarketplaceAppOverview = MarketplaceAppPreview & MarketplaceAppSocialInfo & {
author: string; author: string;
description: string; description: string;
site?: string; site?: string;
} };
export type AppRating = { export type AppRating = {
recordId: string; recordId: string;
value: number | undefined; value: number | undefined;
count?: number; count?: number;
} };
export type MarketplaceAppWithSecurityReport = MarketplaceAppOverview & { export type MarketplaceAppWithSecurityReport = MarketplaceAppOverview & {
securityReport?: MarketplaceAppSecurityReport; securityReport?: MarketplaceAppSecurityReport;
rating?: AppRating; rating?: AppRating;
} };
export enum MarketplaceCategory { export enum MarketplaceCategory {
ALL = 'All', ALL = 'All',
...@@ -62,11 +62,11 @@ export type MarketplaceAppSecurityReport = { ...@@ -62,11 +62,11 @@ export type MarketplaceAppSecurityReport = {
isVerified: boolean; isVerified: boolean;
solidityScanReport?: SolidityScanReport['scan_report'] | null; solidityScanReport?: SolidityScanReport['scan_report'] | null;
}>; }>;
} };
export type MarketplaceAppSecurityReportRaw = { export type MarketplaceAppSecurityReportRaw = {
appName: string; appName: string;
chainsData: { chainsData: {
[chainId: string]: MarketplaceAppSecurityReport; [chainId: string]: MarketplaceAppSecurityReport;
}; };
} };
...@@ -17,19 +17,19 @@ type NavItemCommon = { ...@@ -17,19 +17,19 @@ type NavItemCommon = {
export type NavItemInternal = NavItemCommon & { export type NavItemInternal = NavItemCommon & {
nextRoute: Route; nextRoute: Route;
isActive?: boolean; isActive?: boolean;
} };
export type NavItemExternal = { export type NavItemExternal = {
text: string; text: string;
url: string; url: string;
} };
export type NavItem = NavItemInternal | NavItemExternal export type NavItem = NavItemInternal | NavItemExternal;
export type NavGroupItem = NavItemCommon & { export type NavGroupItem = NavItemCommon & {
isActive?: boolean; isActive?: boolean;
subItems: Array<NavItem> | Array<Array<NavItem>>; subItems: Array<NavItem> | Array<Array<NavItem>>;
} };
import type { ArrayElement } from '../utils'; import type { ArrayElement } from '../utils';
......
export type StatsInterval = { id: StatsIntervalIds; title: string } export type StatsInterval = { id: StatsIntervalIds; title: string };
export type StatsIntervalIds = keyof typeof StatsIntervalId; export type StatsIntervalIds = keyof typeof StatsIntervalId;
export enum StatsIntervalId { export enum StatsIntervalId {
'all', all,
'oneMonth', oneMonth,
'threeMonths', threeMonths,
'sixMonths', sixMonths,
'oneYear', oneYear,
} }
export type CustomLink = { export type CustomLink = {
text: string; text: string;
url: string; url: string;
} };
export type CustomLinksGroup = { export type CustomLinksGroup = {
title: string; title: string;
links: Array<CustomLink>; links: Array<CustomLink>;
} };
...@@ -10,13 +10,13 @@ export type KeysOfObjectOrNull<T> = keyof ExcludeNull<T>; ...@@ -10,13 +10,13 @@ export type KeysOfObjectOrNull<T> = keyof ExcludeNull<T>;
/** Combines members of an intersection into a readable type. */ /** Combines members of an intersection into a readable type. */
// https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg // https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg
export type Evaluate<Type> = { [key in keyof Type]: Type[key] } & unknown export type Evaluate<Type> = { [key in keyof Type]: Type[key] } & unknown;
// Keeps in the object type only those properties that have the provided type (e.g only numbers) // Keeps in the object type only those properties that have the provided type (e.g only numbers)
export type PickByType<T, X> = Record< export type PickByType<T, X> = Record<
{[K in keyof T]: T[K] extends X ? K : never}[keyof T], { [K in keyof T]: T[K] extends X ? K : never }[keyof T],
X X
>; >;
// Make some properties of an object optional // Make some properties of an object optional
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>> export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
...@@ -40,7 +40,7 @@ type WalletProviderFlags = ...@@ -40,7 +40,7 @@ type WalletProviderFlags =
| 'isTrust' | 'isTrust'
| 'isTrustWallet' | 'isTrustWallet'
| 'isXDEFI' | 'isXDEFI'
| 'isZerion' | 'isZerion';
export type WalletProvider = Evaluate< export type WalletProvider = Evaluate<
EIP1193Provider & { EIP1193Provider & {
...@@ -62,4 +62,4 @@ EIP1193Provider & { ...@@ -62,4 +62,4 @@ EIP1193Provider & {
} }
| undefined; | undefined;
} }
> >;
...@@ -28,7 +28,7 @@ type Props = { ...@@ -28,7 +28,7 @@ type Props = {
scrollRef?: React.RefObject<HTMLDivElement>; scrollRef?: React.RefObject<HTMLDivElement>;
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressAccountHistory = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressAccountHistory = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
......
...@@ -21,7 +21,7 @@ import AddressCoinBalanceHistory from './coinBalance/AddressCoinBalanceHistory'; ...@@ -21,7 +21,7 @@ import AddressCoinBalanceHistory from './coinBalance/AddressCoinBalanceHistory';
type Props = { type Props = {
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressCoinBalance = ({ shouldRender = true, isQueryEnabled = true }: Props) => { const AddressCoinBalance = ({ shouldRender = true, isQueryEnabled = true }: Props) => {
const [ socketAlert, setSocketAlert ] = React.useState(false); const [ socketAlert, setSocketAlert ] = React.useState(false);
......
...@@ -18,7 +18,7 @@ type Props = { ...@@ -18,7 +18,7 @@ type Props = {
scrollRef?: React.RefObject<HTMLDivElement>; scrollRef?: React.RefObject<HTMLDivElement>;
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressEpochRewards = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressEpochRewards = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
......
...@@ -27,7 +27,7 @@ type Props = { ...@@ -27,7 +27,7 @@ type Props = {
scrollRef?: React.RefObject<HTMLDivElement>; scrollRef?: React.RefObject<HTMLDivElement>;
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressInternalTxs = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressInternalTxs = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
const isMounted = useIsMounted(); const isMounted = useIsMounted();
......
...@@ -13,11 +13,11 @@ import useQueryWithPages from 'ui/shared/pagination/useQueryWithPages'; ...@@ -13,11 +13,11 @@ import useQueryWithPages from 'ui/shared/pagination/useQueryWithPages';
import AddressCsvExportLink from './AddressCsvExportLink'; import AddressCsvExportLink from './AddressCsvExportLink';
type Props ={ type Props = {
scrollRef?: React.RefObject<HTMLDivElement>; scrollRef?: React.RefObject<HTMLDivElement>;
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressLogs = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressLogs = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
......
...@@ -7,11 +7,11 @@ import AddressMudRecord from './mud/AddressMudRecord'; ...@@ -7,11 +7,11 @@ import AddressMudRecord from './mud/AddressMudRecord';
import AddressMudTable from './mud/AddressMudTable'; import AddressMudTable from './mud/AddressMudTable';
import AddressMudTables from './mud/AddressMudTables'; import AddressMudTables from './mud/AddressMudTables';
type Props ={ type Props = {
scrollRef?: React.RefObject<HTMLDivElement>; scrollRef?: React.RefObject<HTMLDivElement>;
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressMud = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressMud = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => {
const isMounted = useIsMounted(); const isMounted = useIsMounted();
......
...@@ -37,7 +37,7 @@ import AddressCsvExportLink from './AddressCsvExportLink'; ...@@ -37,7 +37,7 @@ import AddressCsvExportLink from './AddressCsvExportLink';
type Filters = { type Filters = {
type: Array<TokenType>; type: Array<TokenType>;
filter: AddressFromToFilter | undefined; filter: AddressFromToFilter | undefined;
} };
const getTokenFilterValue = (getFilterValuesFromQuery<TokenType>).bind(null, TOKEN_TYPE_IDS); const getTokenFilterValue = (getFilterValuesFromQuery<TokenType>).bind(null, TOKEN_TYPE_IDS);
const getAddressFilterValue = (getFilterValueFromQuery<AddressFromToFilter>).bind(null, AddressFromToFilterValues); const getAddressFilterValue = (getFilterValueFromQuery<AddressFromToFilter>).bind(null, AddressFromToFilterValues);
...@@ -68,7 +68,7 @@ type Props = { ...@@ -68,7 +68,7 @@ type Props = {
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
// for tests only // for tests only
overloadCount?: number; overloadCount?: number;
} };
const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
......
...@@ -46,7 +46,7 @@ const getTokenFilterValue = (getFilterValuesFromQuery<NFTTokenType>).bind(null, ...@@ -46,7 +46,7 @@ const getTokenFilterValue = (getFilterValuesFromQuery<NFTTokenType>).bind(null,
type Props = { type Props = {
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressTokens = ({ shouldRender = true, isQueryEnabled = true }: Props) => { const AddressTokens = ({ shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
......
...@@ -52,7 +52,7 @@ type Props = { ...@@ -52,7 +52,7 @@ type Props = {
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
// for tests only // for tests only
overloadCount?: number; overloadCount?: number;
} };
const AddressTxs = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressTxs = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
......
...@@ -12,7 +12,7 @@ type Props = { ...@@ -12,7 +12,7 @@ type Props = {
scrollRef?: React.RefObject<HTMLDivElement>; scrollRef?: React.RefObject<HTMLDivElement>;
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressUserOps = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressUserOps = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
......
...@@ -17,7 +17,7 @@ type Props = { ...@@ -17,7 +17,7 @@ type Props = {
scrollRef?: React.RefObject<HTMLDivElement>; scrollRef?: React.RefObject<HTMLDivElement>;
shouldRender?: boolean; shouldRender?: boolean;
isQueryEnabled?: boolean; isQueryEnabled?: boolean;
} };
const AddressWithdrawals = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => { const AddressWithdrawals = ({ scrollRef, shouldRender = true, isQueryEnabled = true }: Props) => {
const router = useRouter(); const router = useRouter();
const isMounted = useIsMounted(); const isMounted = useIsMounted();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment