Skip to content

Commit

Permalink
merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminaAiren committed Oct 11, 2023
1 parent 1024fea commit 2224d48
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/api/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import type { TTxsFilters } from 'types/api/txsFilters';
import type { TxStateChanges } from 'types/api/txStateChanges';
import type { VisualizedContract } from 'types/api/visualization';
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 config from 'configs/app';
Expand Down Expand Up @@ -506,6 +506,7 @@ export const RESOURCES = {
zkevm_l2_txn_batch_txs: {
path: 'api/v2/transactions/zkevm-batch/:number',
pathParams: [ 'number' as const ],
filterFields: [],
},

// CONFIGS
Expand Down Expand Up @@ -671,7 +672,7 @@ Q extends 'l2_txn_batches_count' ? number :
Q extends 'zkevm_l2_txn_batches' ? ZkEvmL2TxnBatchesResponse :
Q extends 'zkevm_l2_txn_batches_count' ? number :
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 :
never;
/* eslint-enable @typescript-eslint/indent */
Expand Down
1 change: 1 addition & 0 deletions playwright/utils/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const featureEnvs = {
name: 'NEXT_PUBLIC_BRIDGED_TOKENS_BRIDGES',
value: '[{"type":"omni","title":"OmniBridge","short_title":"OMNI"},{"type":"amb","title":"Arbitrary Message Bridge","short_title":"AMB"}]',
},
],
zkRollup: [
{ name: 'NEXT_PUBLIC_IS_ZKEVM_L2_NETWORK', value: 'true' },
{ name: 'NEXT_PUBLIC_L1_BASE_URL', value: 'https://localhost:3101' },
Expand Down
8 changes: 8 additions & 0 deletions types/api/zkEvml2TxnBatches.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { Transaction } from './transaction';

export type ZkEvmL2TxnBatchesItem = {
number: number;
verify_tx_hash: string | null;
Expand Down Expand Up @@ -28,3 +30,9 @@ export type ZkEvmL2TxnBatch = {
transactions: Array<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;
}
2 changes: 1 addition & 1 deletion ui/pages/ZkEvmL2TxnBatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const ZkEvmL2TxnBatch = () => {
options: {
enabled: Boolean(!batchQuery.isPlaceholderData && batchQuery.data?.number && tab === '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 }),
},
});

Expand Down
Binary file modified ui/pages/__screenshots__/Token.pw.tsx_default_bridged-token-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion ui/tx/TxDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { scroller, Element } from 'react-scroll';

import { ZKEVM_L2_TX_STATUSES } from 'types/api/transaction';

import { route } from 'nextjs-routes';

import config from 'configs/app';
import clockIcon from 'icons/clock.svg';
import flameIcon from 'icons/flame.svg';
Expand Down Expand Up @@ -333,7 +335,7 @@ const TxDetails = () => {
</DetailsInfoItem>
) }

{ (data.zkevm_batch_number || data.zkevm_verify_hash) && divider }
{ (data.zkevm_batch_number || data.zkevm_verify_hash) && <DetailsInfoItemDivider/> }

<DetailsInfoItem
title="Value"
Expand Down

0 comments on commit 2224d48

Please sign in to comment.