Commit e67c6ff0 authored by isstuev's avatar isstuev

merge fixes

parent ccb248df
...@@ -59,7 +59,7 @@ import type { TTxsFilters } from 'types/api/txsFilters'; ...@@ -59,7 +59,7 @@ import type { TTxsFilters } from 'types/api/txsFilters';
import type { TxStateChanges } from 'types/api/txStateChanges'; import type { TxStateChanges } from 'types/api/txStateChanges';
import type { VisualizedContract } from 'types/api/visualization'; import type { VisualizedContract } from 'types/api/visualization';
import type { WithdrawalsResponse, WithdrawalsCounters } from 'types/api/withdrawals'; import type { WithdrawalsResponse, WithdrawalsCounters } from 'types/api/withdrawals';
import type { ZkEvmL2TxnBatch, ZkEvmL2TxnBatchesItem, ZkEvmL2TxnBatchesResponse } from 'types/api/zkEvml2TxnBatches'; import type { ZkEvmL2TxnBatch, ZkEvmL2TxnBatchesItem, ZkEvmL2TxnBatchesResponse, ZkEvmL2TxnBatchTxs } from 'types/api/zkEvml2TxnBatches';
import type { ArrayElement } from 'types/utils'; import type { ArrayElement } from 'types/utils';
import config from 'configs/app'; import config from 'configs/app';
...@@ -506,6 +506,7 @@ export const RESOURCES = { ...@@ -506,6 +506,7 @@ export const RESOURCES = {
zkevm_l2_txn_batch_txs: { zkevm_l2_txn_batch_txs: {
path: 'api/v2/transactions/zkevm-batch/:number', path: 'api/v2/transactions/zkevm-batch/:number',
pathParams: [ 'number' as const ], pathParams: [ 'number' as const ],
filterFields: [],
}, },
// CONFIGS // CONFIGS
...@@ -671,7 +672,7 @@ Q extends 'l2_txn_batches_count' ? number : ...@@ -671,7 +672,7 @@ Q extends 'l2_txn_batches_count' ? number :
Q extends 'zkevm_l2_txn_batches' ? ZkEvmL2TxnBatchesResponse : Q extends 'zkevm_l2_txn_batches' ? ZkEvmL2TxnBatchesResponse :
Q extends 'zkevm_l2_txn_batches_count' ? number : Q extends 'zkevm_l2_txn_batches_count' ? number :
Q extends 'zkevm_l2_txn_batch' ? ZkEvmL2TxnBatch : Q extends 'zkevm_l2_txn_batch' ? ZkEvmL2TxnBatch :
Q extends 'zkevm_l2_txn_batch_txs' ? { items: Array<Transaction> } : Q extends 'zkevm_l2_txn_batch_txs' ? ZkEvmL2TxnBatchTxs :
Q extends 'config_backend_version' ? BackendVersionConfig : Q extends 'config_backend_version' ? BackendVersionConfig :
never; never;
/* eslint-enable @typescript-eslint/indent */ /* eslint-enable @typescript-eslint/indent */
......
import type { Transaction } from './transaction';
export type ZkEvmL2TxnBatchesItem = { export type ZkEvmL2TxnBatchesItem = {
number: number; number: number;
verify_tx_hash: string | null; verify_tx_hash: string | null;
...@@ -28,3 +30,9 @@ export type ZkEvmL2TxnBatch = { ...@@ -28,3 +30,9 @@ export type ZkEvmL2TxnBatch = {
transactions: Array<string>; transactions: Array<string>;
verify_tx_hash: string; verify_tx_hash: string;
} }
export type ZkEvmL2TxnBatchTxs = {
items: Array<Transaction>;
// API responce doesn't have next_page_params option, but we need to add it to the type for consistency
next_page_params: null;
}
...@@ -37,7 +37,7 @@ const ZkEvmL2TxnBatch = () => { ...@@ -37,7 +37,7 @@ const ZkEvmL2TxnBatch = () => {
options: { options: {
enabled: Boolean(!batchQuery.isPlaceholderData && batchQuery.data?.number && tab === 'txs'), enabled: Boolean(!batchQuery.isPlaceholderData && batchQuery.data?.number && tab === 'txs'),
// there is no pagination in zkevm_l2_txn_batch_txs // there is no pagination in zkevm_l2_txn_batch_txs
placeholderData: generateListStub<'block_txs'>(TX_ZKEVM_L2, 50, { next_page_params: null }), placeholderData: generateListStub<'zkevm_l2_txn_batch_txs'>(TX_ZKEVM_L2, 50, { next_page_params: null }),
}, },
}); });
......
...@@ -19,6 +19,8 @@ import { scroller, Element } from 'react-scroll'; ...@@ -19,6 +19,8 @@ import { scroller, Element } from 'react-scroll';
import { ZKEVM_L2_TX_STATUSES } from 'types/api/transaction'; import { ZKEVM_L2_TX_STATUSES } from 'types/api/transaction';
import { route } from 'nextjs-routes';
import config from 'configs/app'; import config from 'configs/app';
import clockIcon from 'icons/clock.svg'; import clockIcon from 'icons/clock.svg';
import flameIcon from 'icons/flame.svg'; import flameIcon from 'icons/flame.svg';
......
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