Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
73d7fd4e
Commit
73d7fd4e
authored
Apr 19, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change routes and refactor l2
parent
fa319e9f
Changes
48
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
131 additions
and
131 deletions
+131
-131
values.yaml
deploy/values/l2-optimism-goerli/values.yaml
+4
-4
values.yaml
deploy/values/review-l2/values.yaml
+4
-4
resources.ts
lib/api/resources.ts
+22
-22
useNavItems.tsx
lib/hooks/useNavItems.tsx
+4
-4
deposits.ts
mocks/l2deposits/deposits.ts
+0
-0
outputRoots.ts
mocks/l2outputRoots/outputRoots.ts
+0
-0
txnBatches.ts
mocks/l2txnBatches/txnBatches.ts
+0
-0
withdrawals.ts
mocks/l2withdrawals/withdrawals.ts
+0
-0
l2-deposits.tsx
pages/l2-deposits.tsx
+2
-2
l2-output-roots.tsx
pages/l2-output-roots.tsx
+2
-2
l2-txn-batches.tsx
pages/l2-txn-batches.tsx
+2
-2
l2-withdrawals.tsx
pages/l2-withdrawals.tsx
+2
-2
l2Deposits.ts
types/api/l2Deposits.ts
+3
-3
l2OutputRoots.ts
types/api/l2OutputRoots.ts
+3
-3
l2TxnBatches.ts
types/api/l2TxnBatches.ts
+3
-3
l2Withdrawals.ts
types/api/l2Withdrawals.ts
+4
-4
nextjs-routes.d.ts
types/nextjs-routes.d.ts
+5
-5
LatestDeposits.pw.tsx
ui/home/LatestDeposits.pw.tsx
+1
-1
LatestDeposits.tsx
ui/home/LatestDeposits.tsx
+1
-1
LatestDepositsItem.tsx
ui/home/LatestDepositsItem.tsx
+2
-2
DepositsListItem.tsx
ui/l2Deposits/DepositsListItem.tsx
+2
-2
DepositsTable.tsx
ui/l2Deposits/DepositsTable.tsx
+2
-2
DepositsTableItem.tsx
ui/l2Deposits/DepositsTableItem.tsx
+2
-2
OutputRootsListItem.tsx
ui/l2OutputRoots/OutputRootsListItem.tsx
+2
-2
OutputRootsTable.tsx
ui/l2OutputRoots/OutputRootsTable.tsx
+2
-2
OutputRootsTableItem.tsx
ui/l2OutputRoots/OutputRootsTableItem.tsx
+2
-2
TxnBatchesListItem.tsx
ui/l2TxnBatches/TxnBatchesListItem.tsx
+2
-2
TxnBatchesTable.tsx
ui/l2TxnBatches/TxnBatchesTable.tsx
+2
-2
TxnBatchesTableItem.tsx
ui/l2TxnBatches/TxnBatchesTableItem.tsx
+2
-2
WithdrawalsListItem.tsx
ui/l2Withdrawals/WithdrawalsListItem.tsx
+2
-2
WithdrawalsTable.tsx
ui/l2Withdrawals/WithdrawalsTable.tsx
+2
-2
WithdrawalsTableItem.tsx
ui/l2Withdrawals/WithdrawalsTableItem.tsx
+2
-2
L2Deposits.pw.tsx
ui/pages/L2Deposits.pw.tsx
+5
-5
L2Deposits.tsx
ui/pages/L2Deposits.tsx
+6
-6
L2OutputRoots.pw.tsx
ui/pages/L2OutputRoots.pw.tsx
+4
-4
L2OutputRoots.tsx
ui/pages/L2OutputRoots.tsx
+6
-6
L2TxnBatches.pw.tsx
ui/pages/L2TxnBatches.pw.tsx
+5
-5
L2TxnBatches.tsx
ui/pages/L2TxnBatches.tsx
+6
-6
L2Withdrawals.pw.tsx
ui/pages/L2Withdrawals.pw.tsx
+5
-5
L2Withdrawals.tsx
ui/pages/L2Withdrawals.tsx
+6
-6
L2Deposits.pw.tsx_default_base-view-mobile-1.png
...nshots__/L2Deposits.pw.tsx_default_base-view-mobile-1.png
+0
-0
L2Deposits.pw.tsx_mobile_base-view-mobile-1.png
...enshots__/L2Deposits.pw.tsx_mobile_base-view-mobile-1.png
+0
-0
L2OutputRoots.pw.tsx_default_base-view-mobile-1.png
...ots__/L2OutputRoots.pw.tsx_default_base-view-mobile-1.png
+0
-0
L2OutputRoots.pw.tsx_mobile_base-view-mobile-1.png
...hots__/L2OutputRoots.pw.tsx_mobile_base-view-mobile-1.png
+0
-0
L2TxnBatches.pw.tsx_default_base-view-mobile-1.png
...hots__/L2TxnBatches.pw.tsx_default_base-view-mobile-1.png
+0
-0
L2TxnBatches.pw.tsx_mobile_base-view-mobile-1.png
...shots__/L2TxnBatches.pw.tsx_mobile_base-view-mobile-1.png
+0
-0
L2Withdrawals.pw.tsx_default_base-view-mobile-1.png
...ots__/L2Withdrawals.pw.tsx_default_base-view-mobile-1.png
+0
-0
L2Withdrawals.pw.tsx_mobile_base-view-mobile-1.png
...hots__/L2Withdrawals.pw.tsx_mobile_base-view-mobile-1.png
+0
-0
No files found.
deploy/values/l2-optimism-goerli/values.yaml
View file @
73d7fd4e
...
...
@@ -317,10 +317,10 @@ frontend:
-
"
/accounts"
-
"
/visualize"
-
"
/api-docs"
-
"
/output-roots"
-
"
/txn-batches"
-
"
/withdrawals"
-
"
/deposits"
-
"
/
l2-
output-roots"
-
"
/
l2-
txn-batches"
-
"
/
l2-
withdrawals"
-
"
/
l2-
deposits"
resources
:
limits
:
memory
:
...
...
deploy/values/review-l2/values.yaml
View file @
73d7fd4e
...
...
@@ -40,10 +40,10 @@ frontend:
-
"
/csv-export"
-
"
/verified-contracts"
-
"
/graphiql"
-
"
/output-roots"
-
"
/txn-batches"
-
"
/withdrawals"
-
"
/deposits"
-
"
/
l2-
output-roots"
-
"
/
l2-
txn-batches"
-
"
/
l2-
withdrawals"
-
"
/
l2-
deposits"
resources
:
limits
:
...
...
lib/api/resources.ts
View file @
73d7fd4e
...
...
@@ -18,11 +18,13 @@ import type { BlocksResponse, BlockTransactionsResponse, Block, BlockFilters } f
import
type
{
ChartMarketResponse
,
ChartTransactionResponse
}
from
'
types/api/charts
'
;
import
type
{
SmartContract
,
SmartContractReadMethod
,
SmartContractWriteMethod
,
SmartContractVerificationConfig
}
from
'
types/api/contract
'
;
import
type
{
VerifiedContractsResponse
,
VerifiedContractsFilters
,
VerifiedContractsCounters
}
from
'
types/api/contracts
'
;
import
type
{
DepositsResponse
,
DepositsItem
}
from
'
types/api/deposits
'
;
import
type
{
IndexingStatus
}
from
'
types/api/indexingStatus
'
;
import
type
{
InternalTransactionsResponse
}
from
'
types/api/internalTransaction
'
;
import
type
{
L2DepositsResponse
,
L2DepositsItem
}
from
'
types/api/l2Deposits
'
;
import
type
{
L2OutputRootsResponse
}
from
'
types/api/l2OutputRoots
'
;
import
type
{
L2TxnBatchesResponse
}
from
'
types/api/l2TxnBatches
'
;
import
type
{
L2WithdrawalsResponse
}
from
'
types/api/l2Withdrawals
'
;
import
type
{
LogsResponseTx
,
LogsResponseAddress
}
from
'
types/api/log
'
;
import
type
{
OutputRootsResponse
}
from
'
types/api/outputRoots
'
;
import
type
{
RawTracesResponse
}
from
'
types/api/rawTrace
'
;
import
type
{
SearchRedirectResult
,
SearchResult
,
SearchResultFilters
}
from
'
types/api/search
'
;
import
type
{
Counters
,
StatsCharts
,
StatsChart
,
HomeStats
}
from
'
types/api/stats
'
;
...
...
@@ -37,11 +39,9 @@ import type {
import
type
{
TokensResponse
,
TokensFilters
,
TokenInstanceTransferResponse
}
from
'
types/api/tokens
'
;
import
type
{
TokenTransferResponse
,
TokenTransferFilters
}
from
'
types/api/tokenTransfer
'
;
import
type
{
TransactionsResponseValidated
,
TransactionsResponsePending
,
Transaction
}
from
'
types/api/transaction
'
;
import
type
{
TxnBatchesResponse
}
from
'
types/api/txnBatches
'
;
import
type
{
TTxsFilters
}
from
'
types/api/txsFilters
'
;
import
type
{
TxStateChanges
}
from
'
types/api/txStateChanges
'
;
import
type
{
VisualizedContract
}
from
'
types/api/visualization
'
;
import
type
{
WithdrawalsResponse
}
from
'
types/api/withdrawals
'
;
import
type
{
ArrayElement
}
from
'
types/utils
'
;
import
appConfig
from
'
configs/app/config
'
;
...
...
@@ -375,43 +375,43 @@ export const RESOURCES = {
},
// L2
deposits
:
{
l2_
deposits
:
{
path
:
'
/api/v2/optimism/deposits
'
,
paginationFields
:
[
'
nonce
'
as
const
,
'
items_count
'
as
const
],
filterFields
:
[],
},
deposits_count
:
{
l2_
deposits_count
:
{
path
:
'
/api/v2/optimism/deposits/count
'
,
},
withdrawals
:
{
l2_
withdrawals
:
{
path
:
'
/api/v2/optimism/withdrawals
'
,
paginationFields
:
[
'
nonce
'
as
const
,
'
items_count
'
as
const
],
filterFields
:
[],
},
withdrawals_count
:
{
l2_
withdrawals_count
:
{
path
:
'
/api/v2/optimism/withdrawals/count
'
,
},
output_roots
:
{
l2_
output_roots
:
{
path
:
'
/api/v2/optimism/output-roots
'
,
paginationFields
:
[
'
index
'
as
const
,
'
items_count
'
as
const
],
filterFields
:
[],
},
output_roots_count
:
{
l2_
output_roots_count
:
{
path
:
'
/api/v2/optimism/output-roots/count
'
,
},
txn_batches
:
{
l2_
txn_batches
:
{
path
:
'
/api/v2/optimism/txn-batches
'
,
paginationFields
:
[
'
block_number
'
as
const
,
'
items_count
'
as
const
],
filterFields
:
[],
},
txn_batches_count
:
{
l2_
txn_batches_count
:
{
path
:
'
/api/v2/optimism/txn-batches/count
'
,
},
...
...
@@ -474,7 +474,7 @@ export type PaginatedResources = 'blocks' | 'block_txs' |
'
token_transfers
'
|
'
token_holders
'
|
'
token_inventory
'
|
'
tokens
'
|
'
token_instance_transfers
'
|
'
verified_contracts
'
|
'
output_roots
'
|
'
withdrawals
'
|
'
txn_batches
'
|
'
deposits
'
;
'
l2_output_roots
'
|
'
l2_withdrawals
'
|
'
l2_txn_batches
'
|
'
l2_
deposits
'
;
export
type
PaginatedResponse
<
Q
extends
PaginatedResources
>
=
ResourcePayload
<
Q
>
;
...
...
@@ -492,7 +492,7 @@ Q extends 'homepage_chart_txs' ? ChartTransactionResponse :
Q
extends
'
homepage_chart_market
'
?
ChartMarketResponse
:
Q
extends
'
homepage_blocks
'
?
Array
<
Block
>
:
Q
extends
'
homepage_txs
'
?
Array
<
Transaction
>
:
Q
extends
'
homepage_deposits
'
?
Array
<
DepositsItem
>
:
Q
extends
'
homepage_deposits
'
?
Array
<
L2
DepositsItem
>
:
Q
extends
'
homepage_indexing_status
'
?
IndexingStatus
:
Q
extends
'
stats_counters
'
?
Counters
:
Q
extends
'
stats_lines
'
?
StatsCharts
:
...
...
@@ -539,14 +539,14 @@ Q extends 'verified_contracts' ? VerifiedContractsResponse :
Q
extends
'
verified_contracts_counters
'
?
VerifiedContractsCounters
:
Q
extends
'
visualize_sol2uml
'
?
VisualizedContract
:
Q
extends
'
contract_verification_config
'
?
SmartContractVerificationConfig
:
Q
extends
'
output_roots
'
?
OutputRootsResponse
:
Q
extends
'
withdrawals
'
?
WithdrawalsResponse
:
Q
extends
'
deposits
'
?
DepositsResponse
:
Q
extends
'
txn_batches
'
?
TxnBatchesResponse
:
Q
extends
'
output_roots_count
'
?
number
:
Q
extends
'
withdrawals_count
'
?
number
:
Q
extends
'
deposits_count
'
?
number
:
Q
extends
'
txn_batches_count
'
?
number
:
Q
extends
'
l2_output_roots
'
?
L2
OutputRootsResponse
:
Q
extends
'
l2_withdrawals
'
?
L2
WithdrawalsResponse
:
Q
extends
'
l2_deposits
'
?
L2
DepositsResponse
:
Q
extends
'
l2_txn_batches
'
?
L2
TxnBatchesResponse
:
Q
extends
'
l2_
output_roots_count
'
?
number
:
Q
extends
'
l2_
withdrawals_count
'
?
number
:
Q
extends
'
l2_
deposits_count
'
?
number
:
Q
extends
'
l2_
txn_batches_count
'
?
number
:
never
;
/* eslint-enable @typescript-eslint/indent */
...
...
lib/hooks/useNavItems.tsx
View file @
73d7fd4e
...
...
@@ -103,16 +103,16 @@ export default function useNavItems(): ReturnType {
[
txs
,
// eslint-disable-next-line max-len
{
text
:
`Deposits (L1
${
rightLineArrow
}
L2)`
,
nextRoute
:
{
pathname
:
'
/
deposits
'
as
const
},
icon
:
depositsIcon
,
isActive
:
pathname
===
'
/
deposits
'
,
isNewUi
:
true
},
{
text
:
`Deposits (L1
${
rightLineArrow
}
L2)`
,
nextRoute
:
{
pathname
:
'
/
l2-deposits
'
as
const
},
icon
:
depositsIcon
,
isActive
:
pathname
===
'
/l2-
deposits
'
,
isNewUi
:
true
},
// eslint-disable-next-line max-len
{
text
:
`Withdrawals (L2
${
rightLineArrow
}
L1)`
,
nextRoute
:
{
pathname
:
'
/
withdrawals
'
as
const
},
icon
:
withdrawalsIcon
,
isActive
:
pathname
===
'
/
withdrawals
'
,
isNewUi
:
true
},
{
text
:
`Withdrawals (L2
${
rightLineArrow
}
L1)`
,
nextRoute
:
{
pathname
:
'
/
l2-withdrawals
'
as
const
},
icon
:
withdrawalsIcon
,
isActive
:
pathname
===
'
/l2-
withdrawals
'
,
isNewUi
:
true
},
],
[
blocks
,
// eslint-disable-next-line max-len
{
text
:
'
Txn batches
'
,
nextRoute
:
{
pathname
:
'
/
txn-batches
'
as
const
},
icon
:
txnBatchIcon
,
isActive
:
pathname
===
'
/
txn-batches
'
,
isNewUi
:
true
},
{
text
:
'
Txn batches
'
,
nextRoute
:
{
pathname
:
'
/
l2-txn-batches
'
as
const
},
icon
:
txnBatchIcon
,
isActive
:
pathname
===
'
/l2-
txn-batches
'
,
isNewUi
:
true
},
// eslint-disable-next-line max-len
{
text
:
'
Output roots
'
,
nextRoute
:
{
pathname
:
'
/
output-roots
'
as
const
},
icon
:
outputRootsIcon
,
isActive
:
pathname
===
'
/
output-roots
'
,
isNewUi
:
true
},
{
text
:
'
Output roots
'
,
nextRoute
:
{
pathname
:
'
/
l2-output-roots
'
as
const
},
icon
:
outputRootsIcon
,
isActive
:
pathname
===
'
/l2-
output-roots
'
,
isNewUi
:
true
},
],
[
topAccounts
,
...
...
mocks/deposits/deposits.ts
→
mocks/
l2
deposits/deposits.ts
View file @
73d7fd4e
File moved
mocks/outputRoots/outputRoots.ts
→
mocks/
l2
outputRoots/outputRoots.ts
View file @
73d7fd4e
File moved
mocks/txnBatches/txnBatches.ts
→
mocks/
l2
txnBatches/txnBatches.ts
View file @
73d7fd4e
File moved
mocks/withdrawals/withdrawals.ts
→
mocks/
l2
withdrawals/withdrawals.ts
View file @
73d7fd4e
File moved
pages/deposits.tsx
→
pages/
l2-
deposits.tsx
View file @
73d7fd4e
...
...
@@ -3,7 +3,7 @@ import Head from 'next/head';
import
React
from
'
react
'
;
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
import
Deposits
from
'
ui/pages/
Deposits
'
;
import
L2Deposits
from
'
ui/pages/L2
Deposits
'
;
const
DepositsPage
:
NextPage
=
()
=>
{
const
title
=
getNetworkTitle
();
...
...
@@ -12,7 +12,7 @@ const DepositsPage: NextPage = () => {
<
Head
>
<
title
>
{
title
}
</
title
>
</
Head
>
<
Deposits
/>
<
L2
Deposits
/>
</>
);
};
...
...
pages/output-roots.tsx
→
pages/
l2-
output-roots.tsx
View file @
73d7fd4e
...
...
@@ -3,7 +3,7 @@ import Head from 'next/head';
import
React
from
'
react
'
;
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
import
OutputRoots
from
'
ui/pages/
OutputRoots
'
;
import
L2OutputRoots
from
'
ui/pages/L2
OutputRoots
'
;
const
OutputRootsPage
:
NextPage
=
()
=>
{
const
title
=
getNetworkTitle
();
...
...
@@ -12,7 +12,7 @@ const OutputRootsPage: NextPage = () => {
<
Head
>
<
title
>
{
title
}
</
title
>
</
Head
>
<
OutputRoots
/>
<
L2
OutputRoots
/>
</>
);
};
...
...
pages/txn-batches.tsx
→
pages/
l2-
txn-batches.tsx
View file @
73d7fd4e
...
...
@@ -3,7 +3,7 @@ import Head from 'next/head';
import
React
from
'
react
'
;
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
import
TxnBatches
from
'
ui/pages/
TxnBatches
'
;
import
L2TxnBatches
from
'
ui/pages/L2
TxnBatches
'
;
const
TxnBatchesPage
:
NextPage
=
()
=>
{
const
title
=
getNetworkTitle
();
...
...
@@ -12,7 +12,7 @@ const TxnBatchesPage: NextPage = () => {
<
Head
>
<
title
>
{
title
}
</
title
>
</
Head
>
<
TxnBatches
/>
<
L2
TxnBatches
/>
</>
);
};
...
...
pages/withdrawals.tsx
→
pages/
l2-
withdrawals.tsx
View file @
73d7fd4e
...
...
@@ -3,7 +3,7 @@ import Head from 'next/head';
import
React
from
'
react
'
;
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
import
Withdrawals
from
'
ui/pages/
Withdrawals
'
;
import
L2Withdrawals
from
'
ui/pages/L2
Withdrawals
'
;
const
WithdrawalsPage
:
NextPage
=
()
=>
{
const
title
=
getNetworkTitle
();
...
...
@@ -12,7 +12,7 @@ const WithdrawalsPage: NextPage = () => {
<
Head
>
<
title
>
{
title
}
</
title
>
</
Head
>
<
Withdrawals
/>
<
L2
Withdrawals
/>
</>
);
};
...
...
types/api/
d
eposits.ts
→
types/api/
l2D
eposits.ts
View file @
73d7fd4e
export
type
DepositsItem
=
{
export
type
L2
DepositsItem
=
{
l1_block_number
:
number
;
l1_tx_hash
:
string
;
l1_block_timestamp
:
string
;
...
...
@@ -7,8 +7,8 @@ export type DepositsItem = {
l2_tx_hash
:
string
;
}
export
type
DepositsResponse
=
{
items
:
Array
<
DepositsItem
>
;
export
type
L2
DepositsResponse
=
{
items
:
Array
<
L2
DepositsItem
>
;
next_page_params
:
{
items_count
:
number
;
l1_block_number
:
number
;
...
...
types/api/
o
utputRoots.ts
→
types/api/
l2O
utputRoots.ts
View file @
73d7fd4e
export
type
OutputRootsItem
=
{
export
type
L2
OutputRootsItem
=
{
l1_block_number
:
number
;
l1_timestamp
:
string
;
l1_tx_hash
:
string
;
...
...
@@ -7,8 +7,8 @@ export type OutputRootsItem = {
output_root
:
string
;
}
export
type
OutputRootsResponse
=
{
items
:
Array
<
OutputRootsItem
>
;
export
type
L2
OutputRootsResponse
=
{
items
:
Array
<
L2
OutputRootsItem
>
;
total
:
number
;
next_page_params
:
{
index
:
number
;
...
...
types/api/
t
xnBatches.ts
→
types/api/
l2T
xnBatches.ts
View file @
73d7fd4e
export
type
TxnBatchesItem
=
{
export
type
L2
TxnBatchesItem
=
{
epoch_number
:
number
;
l1_tx_hashes
:
Array
<
string
>
;
l1_timestamp
:
string
;
...
...
@@ -6,8 +6,8 @@ export type TxnBatchesItem = {
tx_count
:
number
;
}
export
type
TxnBatchesResponse
=
{
items
:
Array
<
TxnBatchesItem
>
;
export
type
L2
TxnBatchesResponse
=
{
items
:
Array
<
L2
TxnBatchesItem
>
;
total
:
number
;
next_page_params
:
{
index
:
number
;
...
...
types/api/
w
ithdrawals.ts
→
types/api/
l2W
ithdrawals.ts
View file @
73d7fd4e
import
type
{
AddressParam
}
from
'
./addressParams
'
;
export
type
WithdrawalsItem
=
{
export
type
L2
WithdrawalsItem
=
{
'
challenge_period_end
'
:
string
|
null
;
'
from
'
:
AddressParam
|
null
;
'
l1_tx_hash
'
:
string
|
null
;
...
...
@@ -11,15 +11,15 @@ export type WithdrawalsItem = {
'
status
'
:
string
;
}
export
type
WithdrawalStatus
=
export
type
L2
WithdrawalStatus
=
'
In challenge period
'
|
'
Ready for relay
'
|
'
Relayed
'
|
'
Waiting for state root
'
|
'
Ready to prove
'
;
export
type
WithdrawalsResponse
=
{
items
:
Array
<
WithdrawalsItem
>
;
export
type
L2
WithdrawalsResponse
=
{
items
:
Array
<
L2
WithdrawalsItem
>
;
'
next_page_params
'
:
{
'
items_count
'
:
number
;
'
nonce
'
:
string
;
...
...
types/nextjs-routes.d.ts
View file @
73d7fd4e
...
...
@@ -25,23 +25,23 @@ declare module "nextjs-routes" {
|
DynamicRoute
<
"
/block/[height]
"
,
{
"
height
"
:
string
}
>
|
StaticRoute
<
"
/blocks
"
>
|
StaticRoute
<
"
/csv-export
"
>
|
StaticRoute
<
"
/deposits
"
>
|
StaticRoute
<
"
/graph
"
>
|
StaticRoute
<
"
/graphiql
"
>
|
StaticRoute
<
"
/
"
>
|
StaticRoute
<
"
/l2-deposits
"
>
|
StaticRoute
<
"
/l2-output-roots
"
>
|
StaticRoute
<
"
/l2-txn-batches
"
>
|
StaticRoute
<
"
/l2-withdrawals
"
>
|
StaticRoute
<
"
/login
"
>
|
StaticRoute
<
"
/output-roots
"
>
|
StaticRoute
<
"
/search-results
"
>
|
StaticRoute
<
"
/stats
"
>
|
DynamicRoute
<
"
/token/[hash]
"
,
{
"
hash
"
:
string
}
>
|
DynamicRoute
<
"
/token/[hash]/instance/[id]
"
,
{
"
hash
"
:
string
;
"
id
"
:
string
}
>
|
StaticRoute
<
"
/tokens
"
>
|
DynamicRoute
<
"
/tx/[hash]
"
,
{
"
hash
"
:
string
}
>
|
StaticRoute
<
"
/txn-batches
"
>
|
StaticRoute
<
"
/txs
"
>
|
StaticRoute
<
"
/verified-contracts
"
>
|
StaticRoute
<
"
/visualize/sol2uml
"
>
|
StaticRoute
<
"
/withdrawals
"
>
;
|
StaticRoute
<
"
/visualize/sol2uml
"
>
;
interface
StaticRoute
<
Pathname
>
{
pathname
:
Pathname
;
...
...
ui/home/LatestDeposits.pw.tsx
View file @
73d7fd4e
import
{
test
,
expect
}
from
'
@playwright/experimental-ct-react
'
;
import
React
from
'
react
'
;
import
*
as
depositMock
from
'
mocks/deposits/deposits
'
;
import
*
as
depositMock
from
'
mocks/
l2
deposits/deposits
'
;
import
TestApp
from
'
playwright/TestApp
'
;
import
buildApiUrl
from
'
playwright/utils/buildApiUrl
'
;
...
...
ui/home/LatestDeposits.tsx
View file @
73d7fd4e
...
...
@@ -62,7 +62,7 @@ const LatestDeposits = () => {
}
if
(
data
)
{
const
depositsUrl
=
route
({
pathname
:
'
/deposits
'
});
const
depositsUrl
=
route
({
pathname
:
'
/
l2-
deposits
'
});
return
(
<>
<
SocketNewItemsNotice
borderBottomRadius=
{
0
}
url=
{
depositsUrl
}
num=
{
num
}
alert=
{
socketAlert
}
type=
"deposit"
/>
...
...
ui/home/LatestDepositsItem.tsx
View file @
73d7fd4e
...
...
@@ -8,7 +8,7 @@ import {
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
DepositsItem
}
from
'
types/api/d
eposits
'
;
import
type
{
L2DepositsItem
}
from
'
types/api/l2D
eposits
'
;
import
appConfig
from
'
configs/app/config
'
;
import
blockIcon
from
'
icons/block.svg
'
;
...
...
@@ -20,7 +20,7 @@ import LinkExternal from 'ui/shared/LinkExternal';
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
type
Props
=
{
item
:
DepositsItem
;
item
:
L2
DepositsItem
;
}
const
LatestTxsItem
=
({
item
}:
Props
)
=>
{
...
...
ui/
d
eposits/DepositsListItem.tsx
→
ui/
l2D
eposits/DepositsListItem.tsx
View file @
73d7fd4e
...
...
@@ -3,7 +3,7 @@ import BigNumber from 'bignumber.js';
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
DepositsItem
}
from
'
types/api/d
eposits
'
;
import
type
{
L2DepositsItem
}
from
'
types/api/l2D
eposits
'
;
import
appConfig
from
'
configs/app/config
'
;
import
blockIcon
from
'
icons/block.svg
'
;
...
...
@@ -15,7 +15,7 @@ import LinkExternal from 'ui/shared/LinkExternal';
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
type
Props
=
{
item
:
DepositsItem
};
type
Props
=
{
item
:
L2
DepositsItem
};
const
DepositsListItem
=
({
item
}:
Props
)
=>
{
const
timeAgo
=
dayjs
(
item
.
l1_block_timestamp
).
fromNow
();
...
...
ui/
d
eposits/DepositsTable.tsx
→
ui/
l2D
eposits/DepositsTable.tsx
View file @
73d7fd4e
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
DepositsItem
}
from
'
types/api/d
eposits
'
;
import
type
{
L2DepositsItem
}
from
'
types/api/l2D
eposits
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
DepositsTableItem
from
'
./DepositsTableItem
'
;
type
Props
=
{
items
:
Array
<
DepositsItem
>
;
items
:
Array
<
L2
DepositsItem
>
;
top
:
number
;
}
...
...
ui/
d
eposits/DepositsTableItem.tsx
→
ui/
l2D
eposits/DepositsTableItem.tsx
View file @
73d7fd4e
...
...
@@ -3,7 +3,7 @@ import BigNumber from 'bignumber.js';
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
DepositsItem
}
from
'
types/api/d
eposits
'
;
import
type
{
L2DepositsItem
}
from
'
types/api/l2D
eposits
'
;
import
appConfig
from
'
configs/app/config
'
;
import
blockIcon
from
'
icons/block.svg
'
;
...
...
@@ -14,7 +14,7 @@ import HashStringShorten from 'ui/shared/HashStringShorten';
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
type
Props
=
{
item
:
DepositsItem
};
type
Props
=
{
item
:
L2
DepositsItem
};
const
WithdrawalsTableItem
=
({
item
}:
Props
)
=>
{
const
timeAgo
=
dayjs
(
item
.
l1_block_timestamp
).
fromNow
();
...
...
ui/
o
utputRoots/OutputRootsListItem.tsx
→
ui/
l2O
utputRoots/OutputRootsListItem.tsx
View file @
73d7fd4e
...
...
@@ -2,7 +2,7 @@ import { Box, Flex, Text, Icon } from '@chakra-ui/react';
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
OutputRootsItem
}
from
'
types/api/o
utputRoots
'
;
import
type
{
L2OutputRootsItem
}
from
'
types/api/l2O
utputRoots
'
;
import
appConfig
from
'
configs/app/config
'
;
import
txIcon
from
'
icons/transactions.svg
'
;
...
...
@@ -13,7 +13,7 @@ import LinkExternal from 'ui/shared/LinkExternal';
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
type
Props
=
{
item
:
OutputRootsItem
};
type
Props
=
{
item
:
L2
OutputRootsItem
};
const
OutputRootsListItem
=
({
item
}:
Props
)
=>
{
const
timeAgo
=
dayjs
(
item
.
l1_timestamp
).
fromNow
();
...
...
ui/
o
utputRoots/OutputRootsTable.tsx
→
ui/
l2O
utputRoots/OutputRootsTable.tsx
View file @
73d7fd4e
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
OutputRootsItem
}
from
'
types/api/o
utputRoots
'
;
import
type
{
L2OutputRootsItem
}
from
'
types/api/l2O
utputRoots
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
OutputRootsTableItem
from
'
./OutputRootsTableItem
'
;
type
Props
=
{
items
:
Array
<
OutputRootsItem
>
;
items
:
Array
<
L2
OutputRootsItem
>
;
top
:
number
;
}
...
...
ui/
o
utputRoots/OutputRootsTableItem.tsx
→
ui/
l2O
utputRoots/OutputRootsTableItem.tsx
View file @
73d7fd4e
...
...
@@ -2,7 +2,7 @@ import { Box, Flex, Td, Tr, Text, Icon } from '@chakra-ui/react';
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
OutputRootsItem
}
from
'
types/api/o
utputRoots
'
;
import
type
{
L2OutputRootsItem
}
from
'
types/api/l2O
utputRoots
'
;
import
appConfig
from
'
configs/app/config
'
;
import
txIcon
from
'
icons/transactions.svg
'
;
...
...
@@ -13,7 +13,7 @@ import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
type
Props
=
{
item
:
OutputRootsItem
};
type
Props
=
{
item
:
L2
OutputRootsItem
};
const
OutputRootsTableItem
=
({
item
}:
Props
)
=>
{
const
timeAgo
=
dayjs
(
item
.
l1_timestamp
).
fromNow
();
...
...
ui/
t
xnBatches/TxnBatchesListItem.tsx
→
ui/
l2T
xnBatches/TxnBatchesListItem.tsx
View file @
73d7fd4e
...
...
@@ -2,7 +2,7 @@ import { Box, Icon, VStack } from '@chakra-ui/react';
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
TxnBatchesItem
}
from
'
types/api/t
xnBatches
'
;
import
type
{
L2TxnBatchesItem
}
from
'
types/api/l2T
xnBatches
'
;
import
appConfig
from
'
configs/app/config
'
;
import
txIcon
from
'
icons/transactions.svg
'
;
...
...
@@ -13,7 +13,7 @@ import LinkExternal from 'ui/shared/LinkExternal';
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
type
Props
=
{
item
:
TxnBatchesItem
};
type
Props
=
{
item
:
L2
TxnBatchesItem
};
const
TxnBatchesListItem
=
({
item
}:
Props
)
=>
{
const
timeAgo
=
dayjs
(
item
.
l1_timestamp
).
fromNow
();
...
...
ui/
t
xnBatches/TxnBatchesTable.tsx
→
ui/
l2T
xnBatches/TxnBatchesTable.tsx
View file @
73d7fd4e
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
TxnBatchesItem
}
from
'
types/api/t
xnBatches
'
;
import
type
{
L2TxnBatchesItem
}
from
'
types/api/l2T
xnBatches
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
TxnBatchesTableItem
from
'
./TxnBatchesTableItem
'
;
type
Props
=
{
items
:
Array
<
TxnBatchesItem
>
;
items
:
Array
<
L2
TxnBatchesItem
>
;
top
:
number
;
}
...
...
ui/
t
xnBatches/TxnBatchesTableItem.tsx
→
ui/
l2T
xnBatches/TxnBatchesTableItem.tsx
View file @
73d7fd4e
...
...
@@ -2,7 +2,7 @@ import { Box, Td, Tr, Text, Icon, VStack } from '@chakra-ui/react';
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
TxnBatchesItem
}
from
'
types/api/t
xnBatches
'
;
import
type
{
L2TxnBatchesItem
}
from
'
types/api/l2T
xnBatches
'
;
import
appConfig
from
'
configs/app/config
'
;
import
txIcon
from
'
icons/transactions.svg
'
;
...
...
@@ -12,7 +12,7 @@ import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
type
Props
=
{
item
:
TxnBatchesItem
};
type
Props
=
{
item
:
L2
TxnBatchesItem
};
const
TxnBatchesTableItem
=
({
item
}:
Props
)
=>
{
const
timeAgo
=
dayjs
(
item
.
l1_timestamp
).
fromNow
();
...
...
ui/
w
ithdrawals/WithdrawalsListItem.tsx
→
ui/
l2W
ithdrawals/WithdrawalsListItem.tsx
View file @
73d7fd4e
...
...
@@ -2,7 +2,7 @@ import { Box, Icon } from '@chakra-ui/react';
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
WithdrawalsItem
}
from
'
types/api/w
ithdrawals
'
;
import
type
{
L2WithdrawalsItem
}
from
'
types/api/l2W
ithdrawals
'
;
import
appConfig
from
'
configs/app/config
'
;
import
txIcon
from
'
icons/transactions.svg
'
;
...
...
@@ -15,7 +15,7 @@ import LinkExternal from 'ui/shared/LinkExternal';
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
type
Props
=
{
item
:
WithdrawalsItem
};
type
Props
=
{
item
:
L2
WithdrawalsItem
};
const
WithdrawalsListItem
=
({
item
}:
Props
)
=>
{
const
timeAgo
=
item
.
l2_timestamp
?
dayjs
(
item
.
l2_timestamp
).
fromNow
()
:
null
;
...
...
ui/
w
ithdrawals/WithdrawalsTable.tsx
→
ui/
l2W
ithdrawals/WithdrawalsTable.tsx
View file @
73d7fd4e
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
WithdrawalsItem
}
from
'
types/api/w
ithdrawals
'
;
import
type
{
L2WithdrawalsItem
}
from
'
types/api/l2W
ithdrawals
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
WithdrawalsTableItem
from
'
./WithdrawalsTableItem
'
;
type
Props
=
{
items
:
Array
<
WithdrawalsItem
>
;
items
:
Array
<
L2
WithdrawalsItem
>
;
top
:
number
;
}
...
...
ui/
w
ithdrawals/WithdrawalsTableItem.tsx
→
ui/
l2W
ithdrawals/WithdrawalsTableItem.tsx
View file @
73d7fd4e
...
...
@@ -2,7 +2,7 @@ import { Box, Td, Tr, Text, Icon } from '@chakra-ui/react';
import
{
route
}
from
'
nextjs-routes
'
;
import
React
from
'
react
'
;
import
type
{
WithdrawalsItem
}
from
'
types/api/w
ithdrawals
'
;
import
type
{
L2WithdrawalsItem
}
from
'
types/api/l2W
ithdrawals
'
;
import
appConfig
from
'
configs/app/config
'
;
import
txIcon
from
'
icons/transactions.svg
'
;
...
...
@@ -14,7 +14,7 @@ import HashStringShorten from 'ui/shared/HashStringShorten';
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
type
Props
=
{
item
:
WithdrawalsItem
};
type
Props
=
{
item
:
L2
WithdrawalsItem
};
const
WithdrawalsTableItem
=
({
item
}:
Props
)
=>
{
const
timeAgo
=
item
.
l2_timestamp
?
dayjs
(
item
.
l2_timestamp
).
fromNow
()
:
'
N/A
'
;
...
...
ui/pages/Deposits.pw.tsx
→
ui/pages/
L2
Deposits.pw.tsx
View file @
73d7fd4e
import
{
test
,
expect
}
from
'
@playwright/experimental-ct-react
'
;
import
React
from
'
react
'
;
import
{
data
as
depositsData
}
from
'
mocks/deposits/deposits
'
;
import
{
data
as
depositsData
}
from
'
mocks/
l2
deposits/deposits
'
;
import
TestApp
from
'
playwright/TestApp
'
;
import
buildApiUrl
from
'
playwright/utils/buildApiUrl
'
;
import
Deposits
from
'
./
Deposits
'
;
import
L2Deposits
from
'
./L2
Deposits
'
;
const
DEPOSITS_API_URL
=
buildApiUrl
(
'
deposits
'
);
const
DEPOSITS_COUNT_API_URL
=
buildApiUrl
(
'
deposits_count
'
);
const
DEPOSITS_API_URL
=
buildApiUrl
(
'
l2_
deposits
'
);
const
DEPOSITS_COUNT_API_URL
=
buildApiUrl
(
'
l2_
deposits_count
'
);
test
(
'
base view +@mobile
'
,
async
({
mount
,
page
})
=>
{
await
page
.
route
(
'
https://request-global.czilladx.com/serve/native.php?z=19260bf627546ab7242
'
,
(
route
)
=>
route
.
fulfill
({
...
...
@@ -28,7 +28,7 @@ test('base view +@mobile', async({ mount, page }) => {
const
component
=
await
mount
(
<
TestApp
>
<
Deposits
/>
<
L2
Deposits
/>
</
TestApp
>,
);
...
...
ui/pages/Deposits.tsx
→
ui/pages/
L2
Deposits.tsx
View file @
73d7fd4e
...
...
@@ -5,22 +5,22 @@ import useApiQuery from 'lib/api/useApiQuery';
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useQueryWithPages
from
'
lib/hooks/useQueryWithPages
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
DepositsListItem
from
'
ui/
d
eposits/DepositsListItem
'
;
import
DepositsTable
from
'
ui/
d
eposits/DepositsTable
'
;
import
DepositsListItem
from
'
ui/
l2D
eposits/DepositsListItem
'
;
import
DepositsTable
from
'
ui/
l2D
eposits/DepositsTable
'
;
import
ActionBar
from
'
ui/shared/ActionBar
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
Pagination
from
'
ui/shared/Pagination
'
;
const
Deposits
=
()
=>
{
const
L2
Deposits
=
()
=>
{
const
isMobile
=
useIsMobile
();
const
{
data
,
isError
,
isLoading
,
isPaginationVisible
,
pagination
}
=
useQueryWithPages
({
resourceName
:
'
deposits
'
,
resourceName
:
'
l2_
deposits
'
,
});
const
countersQuery
=
useApiQuery
(
'
deposits_count
'
);
const
countersQuery
=
useApiQuery
(
'
l2_
deposits_count
'
);
const
content
=
data
?.
items
?
(
<>
...
...
@@ -82,4 +82,4 @@ const Deposits = () => {
);
};
export
default
Deposits
;
export
default
L2
Deposits
;
ui/pages/OutputRoots.pw.tsx
→
ui/pages/
L2
OutputRoots.pw.tsx
View file @
73d7fd4e
import
{
test
,
expect
}
from
'
@playwright/experimental-ct-react
'
;
import
React
from
'
react
'
;
import
{
outputRootsData
}
from
'
mocks/outputRoots/outputRoots
'
;
import
{
outputRootsData
}
from
'
mocks/
l2
outputRoots/outputRoots
'
;
import
TestApp
from
'
playwright/TestApp
'
;
import
buildApiUrl
from
'
playwright/utils/buildApiUrl
'
;
import
OutputRoots
from
'
./OutputRoots
'
;
import
OutputRoots
from
'
./
L2
OutputRoots
'
;
const
OUTPUT_ROOTS_API_URL
=
buildApiUrl
(
'
output_roots
'
);
const
OUTPUT_ROOTS_COUNT_API_URL
=
buildApiUrl
(
'
output_roots_count
'
);
const
OUTPUT_ROOTS_API_URL
=
buildApiUrl
(
'
l2_
output_roots
'
);
const
OUTPUT_ROOTS_COUNT_API_URL
=
buildApiUrl
(
'
l2_
output_roots_count
'
);
test
(
'
base view +@mobile
'
,
async
({
mount
,
page
})
=>
{
await
page
.
route
(
'
https://request-global.czilladx.com/serve/native.php?z=19260bf627546ab7242
'
,
(
route
)
=>
route
.
fulfill
({
...
...
ui/pages/OutputRoots.tsx
→
ui/pages/
L2
OutputRoots.tsx
View file @
73d7fd4e
...
...
@@ -4,22 +4,22 @@ import React from 'react';
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useQueryWithPages
from
'
lib/hooks/useQueryWithPages
'
;
import
OutputRootsListItem
from
'
ui/
o
utputRoots/OutputRootsListItem
'
;
import
OutputRootsTable
from
'
ui/
o
utputRoots/OutputRootsTable
'
;
import
OutputRootsListItem
from
'
ui/
l2O
utputRoots/OutputRootsListItem
'
;
import
OutputRootsTable
from
'
ui/
l2O
utputRoots/OutputRootsTable
'
;
import
ActionBar
from
'
ui/shared/ActionBar
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
Pagination
from
'
ui/shared/Pagination
'
;
const
OutputRoots
=
()
=>
{
const
L2
OutputRoots
=
()
=>
{
const
isMobile
=
useIsMobile
();
const
{
data
,
isError
,
isLoading
,
isPaginationVisible
,
pagination
}
=
useQueryWithPages
({
resourceName
:
'
output_roots
'
,
resourceName
:
'
l2_
output_roots
'
,
});
const
countersQuery
=
useApiQuery
(
'
output_roots_count
'
);
const
countersQuery
=
useApiQuery
(
'
l2_
output_roots_count
'
);
const
content
=
data
?.
items
?
(
<>
...
...
@@ -84,4 +84,4 @@ const OutputRoots = () => {
);
};
export
default
OutputRoots
;
export
default
L2
OutputRoots
;
ui/pages/TxnBatches.pw.tsx
→
ui/pages/
L2
TxnBatches.pw.tsx
View file @
73d7fd4e
import
{
test
,
expect
}
from
'
@playwright/experimental-ct-react
'
;
import
React
from
'
react
'
;
import
{
txnBatchesData
}
from
'
mocks/txnBatches/txnBatches
'
;
import
{
txnBatchesData
}
from
'
mocks/
l2
txnBatches/txnBatches
'
;
import
TestApp
from
'
playwright/TestApp
'
;
import
buildApiUrl
from
'
playwright/utils/buildApiUrl
'
;
import
TxnBatches
from
'
./
TxnBatches
'
;
import
L2TxnBatches
from
'
./L2
TxnBatches
'
;
const
TXN_BATCHES_API_URL
=
buildApiUrl
(
'
txn_batches
'
);
const
TXN_BATCHES_COUNT_API_URL
=
buildApiUrl
(
'
txn_batches_count
'
);
const
TXN_BATCHES_API_URL
=
buildApiUrl
(
'
l2_
txn_batches
'
);
const
TXN_BATCHES_COUNT_API_URL
=
buildApiUrl
(
'
l2_
txn_batches_count
'
);
test
(
'
base view +@mobile
'
,
async
({
mount
,
page
})
=>
{
await
page
.
route
(
'
https://request-global.czilladx.com/serve/native.php?z=19260bf627546ab7242
'
,
(
route
)
=>
route
.
fulfill
({
...
...
@@ -28,7 +28,7 @@ test('base view +@mobile', async({ mount, page }) => {
const
component
=
await
mount
(
<
TestApp
>
<
TxnBatches
/>
<
L2
TxnBatches
/>
</
TestApp
>,
);
...
...
ui/pages/TxnBatches.tsx
→
ui/pages/
L2
TxnBatches.tsx
View file @
73d7fd4e
...
...
@@ -5,22 +5,22 @@ import useApiQuery from 'lib/api/useApiQuery';
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useQueryWithPages
from
'
lib/hooks/useQueryWithPages
'
;
import
{
nbsp
}
from
'
lib/html-entities
'
;
import
TxnBatchesListItem
from
'
ui/l2TxnBatches/TxnBatchesListItem
'
;
import
TxnBatchesTable
from
'
ui/l2TxnBatches/TxnBatchesTable
'
;
import
ActionBar
from
'
ui/shared/ActionBar
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
Pagination
from
'
ui/shared/Pagination
'
;
import
TxnBatchesListItem
from
'
ui/txnBatches/TxnBatchesListItem
'
;
import
TxnBatchesTable
from
'
ui/txnBatches/TxnBatchesTable
'
;
const
TxnBatches
=
()
=>
{
const
L2
TxnBatches
=
()
=>
{
const
isMobile
=
useIsMobile
();
const
{
data
,
isError
,
isLoading
,
isPaginationVisible
,
pagination
}
=
useQueryWithPages
({
resourceName
:
'
txn_batches
'
,
resourceName
:
'
l2_
txn_batches
'
,
});
const
countersQuery
=
useApiQuery
(
'
txn_batches_count
'
);
const
countersQuery
=
useApiQuery
(
'
l2_
txn_batches_count
'
);
const
content
=
data
?.
items
?
(
<>
...
...
@@ -85,4 +85,4 @@ const TxnBatches = () => {
);
};
export
default
TxnBatches
;
export
default
L2
TxnBatches
;
ui/pages/Withdrawals.pw.tsx
→
ui/pages/
L2
Withdrawals.pw.tsx
View file @
73d7fd4e
import
{
test
,
expect
}
from
'
@playwright/experimental-ct-react
'
;
import
React
from
'
react
'
;
import
{
data
as
withdrawalsData
}
from
'
mocks/withdrawals/withdrawals
'
;
import
{
data
as
withdrawalsData
}
from
'
mocks/
l2
withdrawals/withdrawals
'
;
import
TestApp
from
'
playwright/TestApp
'
;
import
buildApiUrl
from
'
playwright/utils/buildApiUrl
'
;
import
Withdrawals
from
'
./
Withdrawals
'
;
import
L2Withdrawals
from
'
./L2
Withdrawals
'
;
const
WITHDRAWALS_API_URL
=
buildApiUrl
(
'
withdrawals
'
);
const
WITHDRAWALS_COUNT_API_URL
=
buildApiUrl
(
'
withdrawals_count
'
);
const
WITHDRAWALS_API_URL
=
buildApiUrl
(
'
l2_
withdrawals
'
);
const
WITHDRAWALS_COUNT_API_URL
=
buildApiUrl
(
'
l2_
withdrawals_count
'
);
test
(
'
base view +@mobile
'
,
async
({
mount
,
page
})
=>
{
await
page
.
route
(
'
https://request-global.czilladx.com/serve/native.php?z=19260bf627546ab7242
'
,
(
route
)
=>
route
.
fulfill
({
...
...
@@ -28,7 +28,7 @@ test('base view +@mobile', async({ mount, page }) => {
const
component
=
await
mount
(
<
TestApp
>
<
Withdrawals
/>
<
L2
Withdrawals
/>
</
TestApp
>,
);
...
...
ui/pages/Withdrawals.tsx
→
ui/pages/
L2
Withdrawals.tsx
View file @
73d7fd4e
...
...
@@ -5,22 +5,22 @@ import useApiQuery from 'lib/api/useApiQuery';
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useQueryWithPages
from
'
lib/hooks/useQueryWithPages
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
WithdrawalsListItem
from
'
ui/l2Withdrawals/WithdrawalsListItem
'
;
import
WithdrawalsTable
from
'
ui/l2Withdrawals/WithdrawalsTable
'
;
import
ActionBar
from
'
ui/shared/ActionBar
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
Pagination
from
'
ui/shared/Pagination
'
;
import
WithdrawalsListItem
from
'
ui/withdrawals/WithdrawalsListItem
'
;
import
WithdrawalsTable
from
'
ui/withdrawals/WithdrawalsTable
'
;
const
Withdrawals
=
()
=>
{
const
L2
Withdrawals
=
()
=>
{
const
isMobile
=
useIsMobile
();
const
{
data
,
isError
,
isLoading
,
isPaginationVisible
,
pagination
}
=
useQueryWithPages
({
resourceName
:
'
withdrawals
'
,
resourceName
:
'
l2_
withdrawals
'
,
});
const
countersQuery
=
useApiQuery
(
'
withdrawals_count
'
);
const
countersQuery
=
useApiQuery
(
'
l2_
withdrawals_count
'
);
const
content
=
data
?.
items
?
(
<>
...
...
@@ -82,4 +82,4 @@ const Withdrawals = () => {
);
};
export
default
Withdrawals
;
export
default
L2
Withdrawals
;
ui/pages/__screenshots__/Deposits.pw.tsx_default_base-view-mobile-1.png
→
ui/pages/__screenshots__/
L2
Deposits.pw.tsx_default_base-view-mobile-1.png
View file @
73d7fd4e
File moved
ui/pages/__screenshots__/Deposits.pw.tsx_mobile_base-view-mobile-1.png
→
ui/pages/__screenshots__/
L2
Deposits.pw.tsx_mobile_base-view-mobile-1.png
View file @
73d7fd4e
File moved
ui/pages/__screenshots__/OutputRoots.pw.tsx_default_base-view-mobile-1.png
→
ui/pages/__screenshots__/
L2
OutputRoots.pw.tsx_default_base-view-mobile-1.png
View file @
73d7fd4e
File moved
ui/pages/__screenshots__/OutputRoots.pw.tsx_mobile_base-view-mobile-1.png
→
ui/pages/__screenshots__/
L2
OutputRoots.pw.tsx_mobile_base-view-mobile-1.png
View file @
73d7fd4e
File moved
ui/pages/__screenshots__/TxnBatches.pw.tsx_default_base-view-mobile-1.png
→
ui/pages/__screenshots__/
L2
TxnBatches.pw.tsx_default_base-view-mobile-1.png
View file @
73d7fd4e
File moved
ui/pages/__screenshots__/TxnBatches.pw.tsx_mobile_base-view-mobile-1.png
→
ui/pages/__screenshots__/
L2
TxnBatches.pw.tsx_mobile_base-view-mobile-1.png
View file @
73d7fd4e
File moved
ui/pages/__screenshots__/Withdrawals.pw.tsx_default_base-view-mobile-1.png
→
ui/pages/__screenshots__/
L2
Withdrawals.pw.tsx_default_base-view-mobile-1.png
View file @
73d7fd4e
File moved
ui/pages/__screenshots__/Withdrawals.pw.tsx_mobile_base-view-mobile-1.png
→
ui/pages/__screenshots__/
L2
Withdrawals.pw.tsx_mobile_base-view-mobile-1.png
View file @
73d7fd4e
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment