Skip to content

Commit 8ec4e52

Browse files
Copilottom2drum
andauthored
[Migration 6-2] Feature: data-availability (blockscout#3457)
feat(migration/6-2): migrate data-availability feature files to client/features/data-availability Agent-Logs-Url: https://github.com/blockscout/frontend/sessions/b8a0111e-be79-404c-8ef4-b9b65fea1be0 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
1 parent 455f6d0 commit 8ec4e52

47 files changed

Lines changed: 66 additions & 60 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

client/api/services/general/misc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { ApiResource } from '../../types';
44
import type { DepositsResponse, DepositsCounters, WithdrawalsResponse, WithdrawalsCounters } from 'client/features/chain-variants/beacon-chain/types/api';
55
import type { CeloEpochDetails, CeloEpochElectionRewardDetailsResponse, CeloEpochListResponse } from 'client/features/chain-variants/celo/types/api';
66
import type { CsvExportItemResponse, CsvExportConfig } from 'client/features/csv-export/types/api';
7+
import type { Blob } from 'client/features/data-availability/types/api';
78
import type { HotContractsFilters, HotContractsResponse, HotContractsSorting } from 'client/features/hot-contracts/types/api';
89
import type {
910
ArbitrumL2TxnBatchesItem,
@@ -20,7 +21,6 @@ import type {
2021
Transaction,
2122
} from 'client/slices/tx/types/api';
2223
import type { AdvancedFilterParams, AdvancedFilterResponse, AdvancedFilterMethodsResponse } from 'types/api/advancedFilter';
23-
import type { Blob } from 'types/api/blobs';
2424
import type { ChartMarketResponse, ChartSecondaryCoinPriceResponse, ChartTransactionResponse } from 'types/api/charts';
2525
import type { BackendConfig, BackendVersionConfig, CeloConfig, ContractLanguagesConfig } from 'types/api/configs';
2626
import type { IndexingStatus } from 'types/api/indexingStatus';

client/api/services/general/tx.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { ApiResource } from '../../types';
44
import type { TransactionsResponseWatchlist } from 'client/features/account/types/api';
5-
import type { TransactionsResponseWithBlobs, TxsWithBlobsFilters } from 'client/features/data-availability/types/api';
5+
import type { TransactionsResponseWithBlobs, TxsWithBlobsFilters, TxBlobs } from 'client/features/data-availability/types/api';
66
import type { InternalTransactionFilters, InternalTransactionsResponse } from 'client/slices/internal-tx/types/api';
77
import type { LogsResponseTx } from 'client/slices/log/types/api';
88
import type { TokenTransferResponse, TokenTransferFilters } from 'client/slices/token-transfer/types/api';
@@ -15,7 +15,6 @@ import type {
1515
TxStateChanges,
1616
TxRawTracesResponse,
1717
} from 'client/slices/tx/types/api';
18-
import type { TxBlobs } from 'types/api/blobs';
1918
import type { FheOperationsResponse } from 'types/api/fheOperations';
2019
import type { TxInterpretationResponse } from 'types/api/txInterpretation';
2120

ui/shared/blob/BlobDataType.pw.tsx renamed to client/features/data-availability/components/BlobDataType.pw.tsx

File renamed without changes.

ui/shared/blob/BlobDataType.tsx renamed to client/features/data-availability/components/BlobDataType.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import { Flex } from '@chakra-ui/react';
44
import React from 'react';
55

6-
import * as blobUtils from 'lib/blob';
6+
import guessDataType from 'client/features/data-availability/utils/guess-data-type';
7+
78
import { Skeleton } from 'toolkit/chakra/skeleton';
89
import type { IconName } from 'ui/shared/IconSvg';
910
import IconSvg from 'ui/shared/IconSvg';
@@ -23,7 +24,7 @@ const BlobDataType = ({ data, isLoading }: Props) => {
2324
if (isLoading) {
2425
return;
2526
}
26-
return blobUtils.guessDataType(data);
27+
return guessDataType(data);
2728
}, [ data, isLoading ]);
2829

2930
const { iconName, label } = (() => {

client/features/data-availability/components/SearchBarSuggestBlob.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import React from 'react';
66
import type { SearchResultBlob } from 'client/features/data-availability/types/api';
77
import type { ItemsProps } from 'client/slices/search/components/search-bar/SearchBarSuggest/types';
88

9-
import * as BlobEntity from 'ui/shared/entities/blob/BlobEntity';
9+
import * as BlobEntity from 'client/features/data-availability/components/entity/BlobEntity';
10+
1011
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';
1112

1213
const SearchBarSuggestBlob = ({ data }: ItemsProps<SearchResultBlob>) => {

ui/shared/blob/__screenshots__/BlobDataType.pw.tsx_default_image-data-1.png renamed to client/features/data-availability/components/__screenshots__/BlobDataType.pw.tsx_default_image-data-1.png

File renamed without changes.

ui/shared/blob/__screenshots__/BlobDataType.pw.tsx_default_raw-data-1.png renamed to client/features/data-availability/components/__screenshots__/BlobDataType.pw.tsx_default_raw-data-1.png

File renamed without changes.

ui/shared/blob/__screenshots__/BlobDataType.pw.tsx_default_text-data-1.png renamed to client/features/data-availability/components/__screenshots__/BlobDataType.pw.tsx_default_text-data-1.png

File renamed without changes.

ui/shared/entities/blob/BlobEntity.tsx renamed to client/features/data-availability/components/entity/BlobEntity.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import React from 'react';
66
import { route } from 'nextjs-routes';
77

88
import * as EntityBase from 'ui/shared/entities/base/components';
9-
10-
import { distributeEntityProps } from '../base/utils';
9+
import { distributeEntityProps } from 'ui/shared/entities/base/utils';
1110

1211
type LinkProps = EntityBase.LinkBaseProps & Pick<EntityProps, 'hash'>;
1312

ui/shared/entities/blob/BlobEntityL1.tsx renamed to client/features/data-availability/components/entity/BlobEntityL1.tsx

File renamed without changes.

0 commit comments

Comments
 (0)