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
4aaf1f1a
Commit
4aaf1f1a
authored
Feb 25, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scroll, arbitrum and optimism views
parent
6916f065
Changes
72
Show whitespace changes
Inline
Side-by-side
Showing
72 changed files
with
850 additions
and
996 deletions
+850
-996
tasks.json
.vscode/tasks.json
+1
-0
.env.optimism
configs/envs/.env.optimism
+18
-13
.env.scroll_sepolia
configs/envs/.env.scroll_sepolia
+5
-4
[number].tsx
pages/batches/[number].tsx
+6
-6
[commitment].tsx
pages/batches/celestia/[height]/[commitment].tsx
+14
-14
index.tsx
pages/batches/index.tsx
+6
-6
index.tsx
pages/deposits/index.tsx
+9
-9
index.tsx
pages/dispute-games/index.tsx
+2
-2
index.tsx
pages/output-roots/index.tsx
+2
-2
index.tsx
pages/txn-withdrawals/index.tsx
+7
-7
index.tsx
pages/withdrawals/index.tsx
+9
-9
CutLinkDetails.tsx
toolkit/components/CutLink/CutLinkDetails.tsx
+3
-2
OptimisticDepositsListItem.tsx
ui/deposits/optimisticL2/OptimisticDepositsListItem.tsx
+2
-8
OptimisticDepositsTable.tsx
ui/deposits/optimisticL2/OptimisticDepositsTable.tsx
+15
-16
OptimisticDepositsTableItem.tsx
ui/deposits/optimisticL2/OptimisticDepositsTableItem.tsx
+17
-23
ScrollL2DepositsListItem.tsx
ui/deposits/scrollL2/ScrollL2DepositsListItem.tsx
+3
-9
ScrollL2DepositsTable.tsx
ui/deposits/scrollL2/ScrollL2DepositsTable.tsx
+15
-16
ScrollL2DepositsTableItem.tsx
ui/deposits/scrollL2/ScrollL2DepositsTableItem.tsx
+19
-24
OptimisticL2DisputeGamesListItem.tsx
...teGames/optimisticL2/OptimisticL2DisputeGamesListItem.tsx
+5
-7
OptimisticL2DisputeGamesTable.tsx
...sputeGames/optimisticL2/OptimisticL2DisputeGamesTable.tsx
+16
-17
OptimisticL2DisputeGamesTableItem.tsx
...eGames/optimisticL2/OptimisticL2DisputeGamesTableItem.tsx
+23
-24
ArbitrumL2Messages.tsx
ui/messages/ArbitrumL2Messages.tsx
+11
-10
ArbitrumL2MessagesListItem.tsx
ui/messages/ArbitrumL2MessagesListItem.tsx
+4
-12
ArbitrumL2MessagesTable.tsx
ui/messages/ArbitrumL2MessagesTable.tsx
+16
-17
ArbitrumL2MessagesTableItem.tsx
ui/messages/ArbitrumL2MessagesTableItem.tsx
+22
-29
OptimisticL2OutputRootsListItem.tsx
...putRoots/optimisticL2/OptimisticL2OutputRootsListItem.tsx
+3
-7
OptimisticL2OutputRootsTable.tsx
ui/outputRoots/optimisticL2/OptimisticL2OutputRootsTable.tsx
+14
-15
OptimisticL2OutputRootsTableItem.tsx
...utRoots/optimisticL2/OptimisticL2OutputRootsTableItem.tsx
+17
-20
ArbitrumL2TxnBatch.tsx
ui/pages/ArbitrumL2TxnBatch.tsx
+6
-6
ArbitrumL2TxnBatches.tsx
ui/pages/ArbitrumL2TxnBatches.tsx
+11
-10
ArbitrumL2TxnWithdrawals.tsx
ui/pages/ArbitrumL2TxnWithdrawals.tsx
+5
-4
OptimisticL2Deposits.tsx
ui/pages/OptimisticL2Deposits.tsx
+11
-13
OptimisticL2DisputeGames.tsx
ui/pages/OptimisticL2DisputeGames.tsx
+11
-10
OptimisticL2OutputRoots.tsx
ui/pages/OptimisticL2OutputRoots.tsx
+11
-10
OptimisticL2TxnBatch.tsx
ui/pages/OptimisticL2TxnBatch.tsx
+6
-6
OptimisticL2TxnBatches.tsx
ui/pages/OptimisticL2TxnBatches.tsx
+11
-10
OptimisticL2Withdrawals.tsx
ui/pages/OptimisticL2Withdrawals.tsx
+18
-15
ScrollL2Deposits.tsx
ui/pages/ScrollL2Deposits.tsx
+11
-10
ScrollL2TxnBatch.tsx
ui/pages/ScrollL2TxnBatch.tsx
+6
-6
ScrollL2TxnBatches.tsx
ui/pages/ScrollL2TxnBatches.tsx
+11
-10
ScrollL2Withdrawals.tsx
ui/pages/ScrollL2Withdrawals.tsx
+11
-10
ListItemMobileGrid.tsx
ui/shared/ListItemMobile/ListItemMobileGrid.tsx
+1
-2
ArbitrumL2TxnBatchDA.tsx
ui/shared/batch/ArbitrumL2TxnBatchDA.tsx
+4
-7
CeleniumLink.tsx
ui/shared/batch/CeleniumLink.tsx
+2
-2
OptimisticL2TxnBatchDA.tsx
ui/shared/batch/OptimisticL2TxnBatchDA.tsx
+1
-1
ScrollL2TxnBatchDA.tsx
ui/shared/batch/ScrollL2TxnBatchDA.tsx
+3
-3
FieldError.tsx
ui/shared/forms/components/FieldError.tsx
+1
-1
ArbitrumL2TxnBatchDetails.tsx
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx
+28
-56
ArbitrumL2TxnBatchDetailsAnyTrustDA.tsx
...atches/arbitrumL2/ArbitrumL2TxnBatchDetailsAnyTrustDA.tsx
+67
-72
ArbitrumL2TxnBatchDetailsCelestiaDA.tsx
...atches/arbitrumL2/ArbitrumL2TxnBatchDetailsCelestiaDA.tsx
+9
-9
ArbitrumL2TxnBatchesListItem.tsx
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesListItem.tsx
+8
-15
ArbitrumL2TxnBatchesTable.tsx
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesTable.tsx
+16
-17
ArbitrumL2TxnBatchesTableItem.tsx
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesTableItem.tsx
+26
-32
OptimisticL2TxnBatchBlobWrapper.tsx
...nBatches/optimisticL2/OptimisticL2TxnBatchBlobWrapper.tsx
+3
-5
OptimisticL2TxnBatchDetails.tsx
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchDetails.tsx
+9
-9
OptimisticL2TxnBatchesListItem.tsx
...xnBatches/optimisticL2/OptimisticL2TxnBatchesListItem.tsx
+13
-15
OptimisticL2TxnBatchesTable.tsx
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesTable.tsx
+15
-16
OptimisticL2TxnBatchesTableItem.tsx
...nBatches/optimisticL2/OptimisticL2TxnBatchesTableItem.tsx
+28
-30
ScrollL2TxnBatchDetails.tsx
ui/txnBatches/scrollL2/ScrollL2TxnBatchDetails.tsx
+13
-17
ScrollL2TxnBatchesListItem.tsx
ui/txnBatches/scrollL2/ScrollL2TxnBatchesListItem.tsx
+14
-26
ScrollL2TxnBatchesTable.tsx
ui/txnBatches/scrollL2/ScrollL2TxnBatchesTable.tsx
+19
-20
ScrollL2TxnBatchesTableItem.tsx
ui/txnBatches/scrollL2/ScrollL2TxnBatchesTableItem.tsx
+35
-49
ArbitrumL2TxnWithdrawalsClaimButton.tsx
...rawals/arbitrumL2/ArbitrumL2TxnWithdrawalsClaimButton.tsx
+9
-12
ArbitrumL2TxnWithdrawalsListItem.tsx
...thdrawals/arbitrumL2/ArbitrumL2TxnWithdrawalsListItem.tsx
+3
-3
ArbitrumL2TxnWithdrawalsTable.tsx
...nWithdrawals/arbitrumL2/ArbitrumL2TxnWithdrawalsTable.tsx
+14
-13
ArbitrumL2TxnWithdrawalsTableItem.tsx
...hdrawals/arbitrumL2/ArbitrumL2TxnWithdrawalsTableItem.tsx
+15
-14
OptimisticL2WithdrawalsListItem.tsx
...hdrawals/optimisticL2/OptimisticL2WithdrawalsListItem.tsx
+5
-9
OptimisticL2WithdrawalsTable.tsx
ui/withdrawals/optimisticL2/OptimisticL2WithdrawalsTable.tsx
+16
-17
OptimisticL2WithdrawalsTableItem.tsx
...drawals/optimisticL2/OptimisticL2WithdrawalsTableItem.tsx
+23
-27
ScrollL2WithdrawalsListItem.tsx
ui/withdrawals/scrollL2/ScrollL2WithdrawalsListItem.tsx
+3
-9
ScrollL2WithdrawalsTable.tsx
ui/withdrawals/scrollL2/ScrollL2WithdrawalsTable.tsx
+15
-16
ScrollL2WithdrawalsTableItem.tsx
ui/withdrawals/scrollL2/ScrollL2WithdrawalsTableItem.tsx
+19
-24
No files found.
.vscode/tasks.json
View file @
4aaf1f1a
...
@@ -376,6 +376,7 @@
...
@@ -376,6 +376,7 @@
"polygon"
,
"polygon"
,
"rari_testnet"
,
"rari_testnet"
,
"rootstock_testnet"
,
"rootstock_testnet"
,
"scroll_sepolia"
,
"shibarium"
,
"shibarium"
,
"stability_testnet"
,
"stability_testnet"
,
"zkevm"
,
"zkevm"
,
...
...
configs/envs/.env.optimism
View file @
4aaf1f1a
...
@@ -9,45 +9,49 @@ NEXT_PUBLIC_APP_PORT=3000
...
@@ -9,45 +9,49 @@ NEXT_PUBLIC_APP_PORT=3000
NEXT_PUBLIC_APP_ENV=development
NEXT_PUBLIC_APP_ENV=development
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
NEXT_PUBLIC_ROLLUP_OUTPUT_ROOTS_ENABLED=true
# Instance ENVs
# Instance ENVs
NEXT_PUBLIC_AD_ADBUTLER_CONFIG_DESKTOP={ "id": "749780", "width": "728", "height": "90" }
NEXT_PUBLIC_AD_ADBUTLER_CONFIG_MOBILE={ "id": "749779", "width": "320", "height": "100" }
NEXT_PUBLIC_AD_BANNER_ADDITIONAL_PROVIDER=adbutler
NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://admin-rs.services.blockscout.com
NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://admin-rs.services.blockscout.com
NEXT_PUBLIC_API_BASE_PATH=/
NEXT_PUBLIC_API_BASE_PATH=/
NEXT_PUBLIC_API_HOST=optimism.blockscout.com
NEXT_PUBLIC_API_HOST=optimism.blockscout.com
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
NEXT_PUBLIC_CONTRACT_CODE_IDES=[{'title':'Remix IDE','url':'https://remix.ethereum.org/?address={hash}&blockscout={domain}','icon_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/ide-icons/remix.png'}]
NEXT_PUBLIC_CONTRACT_CODE_IDES=[{'title':'Remix IDE','url':'https://remix.ethereum.org/?address={hash}&blockscout={domain}','icon_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/ide-icons/remix.png'}]
NEXT_PUBLIC_CONTRACT_INFO_API_HOST=https://contracts-info.services.blockscout.com
NEXT_PUBLIC_CONTRACT_INFO_API_HOST=https://contracts-info.services.blockscout.com
NEXT_PUBLIC_DEFI_DROPDOWN_ITEMS=[{'text':'Swap','icon':'swap','dappId':'velodrome'},{'text':'Payment link','icon':'payment_link','dappId':'peanut-protocol'},{'text':'Get gas','icon':'gas','dappId':'smol-refuel'}]
NEXT_PUBLIC_DEFI_DROPDOWN_ITEMS=[{'text':'Swap','icon':'swap','dappId':'rubic'},{'text':'Disperse','icon':'txn_batches_slim','dappId':'smol'},{'text':'Payment link','icon':'payment_link','dappId':'peanut-protocol'},{'text':'Get gas','icon':'gas','dappId':'smol-refuel'}]
NEXT_PUBLIC_DEX_POOLS_ENABLED=true
NEXT_PUBLIC_FAULT_PROOF_ENABLED=true
NEXT_PUBLIC_FAULT_PROOF_ENABLED=true
NEXT_PUBLIC_FEATURED_NETWORKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/featured-networks/optimism-mainnet.json
NEXT_PUBLIC_FEATURED_NETWORKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/featured-networks/optimism-mainnet.json
NEXT_PUBLIC_FOOTER_LINKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/footer-links/optimism.json
NEXT_PUBLIC_FOOTER_LINKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/footer-links/optimism.json
NEXT_PUBLIC_GAME_BADGE_CLAIM_LINK=https://badges.blockscout.com/mint/sherblockHolmesBadge
NEXT_PUBLIC_GAS_REFUEL_PROVIDER_CONFIG={'name': 'Need gas?', 'url_template': 'https://smolrefuel.com/?outboundChain={chainId}&partner=blockscout&utm_source=blockscout&disableBridges=true', 'dapp_id': 'smol-refuel', 'logo': 'https://blockscout-content.s3.amazonaws.com/smolrefuel-logo-action-button.png'}
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0x97f34a4cf685e365460dd38dbe16e092d8e4cc4b6ac779e3abcf4c18df6b1329
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0x97f34a4cf685e365460dd38dbe16e092d8e4cc4b6ac779e3abcf4c18df6b1329
NEXT_PUBLIC_HAS_CONTRACT_AUDIT_REPORTS=true
NEXT_PUBLIC_HAS_USER_OPS=true
NEXT_PUBLIC_HAS_USER_OPS=true
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs', 'coin_price', 'market_cap', 'secondary_coin_price']
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs', 'coin_price', 'market_cap', 'secondary_coin_price']
NEXT_PUBLIC_HOMEPAGE_PLATE_BACKGROUND=linear-gradient(90deg, rgb(232, 52, 53) 0%, rgb(139, 28, 232) 100%)
NEXT_PUBLIC_HOMEPAGE_HERO_BANNER_CONFIG={'background':['linear-gradient(90deg, rgb(232, 52, 53) 0%, rgb(139, 28, 232) 100%)'],'text_color':['rgb(255, 255, 255)']}
NEXT_PUBLIC_HOMEPAGE_PLATE_TEXT_COLOR=rgb(255, 255, 255)
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true
NEXT_PUBLIC_LOGOUT_URL=https://optimism-goerli.us.auth0.com/v2/logout
NEXT_PUBLIC_LOGOUT_URL=https://optimism-goerli.us.auth0.com/v2/logout
NEXT_PUBLIC_MARKETPLACE_BANNER_CONTENT_URL=https://gist.githubusercontent.com/maxaleks/0d18fc309ff499075127b364cc69306d/raw/2a51f961a8c1b9f884f2ab7eed79d4b69330e1ae/peanut_protocol_banner.html
NEXT_PUBLIC_MAINTENANCE_ALERT_MESSAGE=<p>Joined recent campaigns? Mint your Merit Badge <a href="https://badges.blockscout.com?utm_source=instance&utm_medium=optimism">here</a></p>
NEXT_PUBLIC_MARKETPLACE_BANNER_LINK_URL=https://optimism.blockscout.com/apps/peanut-protocol
NEXT_PUBLIC_MARKETPLACE_BANNER_CONTENT_URL=https://gist.githubusercontent.com/maikReal/974c47f86a3158c1a86b092ae2f044b3/raw/abcc7e02150cd85d4974503a0357162c0a2c35a9/merits-banner.html
NEXT_PUBLIC_MARKETPLACE_BANNER_LINK_URL=https://swap.blockscout.com?utm_source=blockscout&utm_medium=optimism
NEXT_PUBLIC_MARKETPLACE_CATEGORIES_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/marketplace-categories/default.json
NEXT_PUBLIC_MARKETPLACE_CATEGORIES_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/marketplace-categories/default.json
NEXT_PUBLIC_MARKETPLACE_ENABLED=true
NEXT_PUBLIC_MARKETPLACE_ENABLED=true
NEXT_PUBLIC_MARKETPLACE_RATING_AIRTABLE_BASE_ID=appGkvtmKI7fXE4Vs
NEXT_PUBLIC_MARKETPLACE_SECURITY_REPORTS_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/marketplace-security-reports/default.json
NEXT_PUBLIC_MARKETPLACE_SECURITY_REPORTS_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/marketplace-security-reports/default.json
NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM=https://airtable.com/appiy5yijZpMMSKjT/shr6uMGPKjj1DK7NL
NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM=https://airtable.com/appiy5yijZpMMSKjT/shr6uMGPKjj1DK7NL
NEXT_PUBLIC_MARKETPLACE_SUGGEST_IDEAS_FORM=https://airtable.com/appiy5yijZpMMSKjT/pag3t82DUCyhGRZZO/form
NEXT_PUBLIC_MARKETPLACE_SUGGEST_IDEAS_FORM=https://airtable.com/appiy5yijZpMMSKjT/pag3t82DUCyhGRZZO/form
NEXT_PUBLIC_METADATA_SERVICE_API_HOST=https://metadata.services.blockscout.com
NEXT_PUBLIC_METADATA_SERVICE_API_HOST=https://metadata.services.blockscout.com
NEXT_PUBLIC_METASUITES_ENABLED=true
NEXT_PUBLIC_METASUITES_ENABLED=true
NEXT_PUBLIC_MULTICHAIN_BALANCE_PROVIDER_CONFIG=[{'name': 'zerion', '
dapp_id': 'zerion', '
url_template': 'https://app.zerion.io/{address}/overview?utm_source=blockscout&utm_medium=address', 'logo': 'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/marketplace-logos/zerion.svg'}]
NEXT_PUBLIC_MULTICHAIN_BALANCE_PROVIDER_CONFIG=[{'name': 'zerion', 'url_template': 'https://app.zerion.io/{address}/overview?utm_source=blockscout&utm_medium=address', 'logo': 'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/marketplace-logos/zerion.svg'}]
NEXT_PUBLIC_NAME_SERVICE_API_HOST=https://bens.services.blockscout.com
NEXT_PUBLIC_NAME_SERVICE_API_HOST=https://bens.services.blockscout.com
NEXT_PUBLIC_NAVIGATION_HIGHLIGHTED_ROUTES=['/
app
s']
NEXT_PUBLIC_NAVIGATION_HIGHLIGHTED_ROUTES=['/
pool
s']
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=Ether
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=Ether
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ETH
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ETH
NEXT_PUBLIC_NETWORK_EXPLORERS=[{'title':'GeckoTerminal','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/geckoterminal.png','baseUrl':'https://www.geckoterminal.com/','paths':{'token':'/optimism/pools'}}, {'title':'Tenderly','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/tenderly.png','baseUrl':'https://dashboard.tenderly.co','paths':{'tx':'/tx/optimistic'}},{'title':'3xpl','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/3xpl.png','baseUrl':'https://3xpl.com/','paths':{'tx':'/optimism/transaction','address':'/optimism/address'}}]
NEXT_PUBLIC_NETWORK_EXPLORERS=[{'title':'GeckoTerminal','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/geckoterminal.png','baseUrl':'https://www.geckoterminal.com/','paths':{'token':'/optimism/pools'}}, {'title':'Tenderly','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/tenderly.png','baseUrl':'https://dashboard.tenderly.co','paths':{'tx':'/tx/optimistic'}},{'title':'3xpl','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/3xpl.png','baseUrl':'https://3xpl.com/','paths':{'tx':'/optimism/transaction','address':'/optimism/address'}}]
NEXT_PUBLIC_NETWORK_ICON=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/optimism.svg
NEXT_PUBLIC_NETWORK_ICON=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/optimism
-mainnet-light
.svg
NEXT_PUBLIC_NETWORK_ICON_DARK=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/optimism.svg
NEXT_PUBLIC_NETWORK_ICON_DARK=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/optimism
-mainnet-dark
.svg
NEXT_PUBLIC_NETWORK_ID=10
NEXT_PUBLIC_NETWORK_ID=10
NEXT_PUBLIC_NETWORK_LOGO=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/optimism.svg
NEXT_PUBLIC_NETWORK_LOGO=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/optimism.svg
NEXT_PUBLIC_NETWORK_LOGO_DARK=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/optimism.svg
NEXT_PUBLIC_NETWORK_LOGO_DARK=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/optimism.svg
...
@@ -67,3 +71,4 @@ NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=blockscout
...
@@ -67,3 +71,4 @@ NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=blockscout
NEXT_PUBLIC_VIEWS_CONTRACT_SOLIDITYSCAN_ENABLED=true
NEXT_PUBLIC_VIEWS_CONTRACT_SOLIDITYSCAN_ENABLED=true
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
NEXT_PUBLIC_WEB3_WALLETS=['token_pocket', 'metamask']
NEXT_PUBLIC_WEB3_WALLETS=['token_pocket', 'metamask']
NEXT_PUBLIC_XSTAR_SCORE_URL=https://docs.xname.app/the-solution-adaptive-proof-of-humanity-on-blockchain/xhs-scoring-algorithm?utm_source=blockscout&utm_medium=address
\ No newline at end of file
configs/envs/.env.scroll_sepolia
View file @
4aaf1f1a
...
@@ -14,7 +14,9 @@ NEXT_PUBLIC_API_BASE_PATH=/
...
@@ -14,7 +14,9 @@ NEXT_PUBLIC_API_BASE_PATH=/
NEXT_PUBLIC_API_HOST=scroll-sepolia.blockscout.com
NEXT_PUBLIC_API_HOST=scroll-sepolia.blockscout.com
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
NEXT_PUBLIC_CONTRACT_CODE_IDES=[{'title':'Remix IDE','url':'https://remix.ethereum.org/?address={hash}&blockscout={domain}','icon_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/ide-icons/remix.png'}]
NEXT_PUBLIC_CONTRACT_CODE_IDES=[{'title':'Remix IDE','url':'https://remix.ethereum.org/?address={hash}&blockscout={domain}','icon_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/ide-icons/remix.png'}]
NEXT_PUBLIC_CONTRACT_INFO_API_HOST=https://contracts-info.services.blockscout.com
NEXT_PUBLIC_FEATURED_NETWORKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/featured-networks/scroll-testnet.json
NEXT_PUBLIC_FEATURED_NETWORKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/featured-networks/scroll-testnet.json
NEXT_PUBLIC_GAME_BADGE_CLAIM_LINK=https://badges.blockscout.com/mint/sherblockHolmesBadge
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0xa0d22caf6217a488b1e97b646c5ed88e8a3020a607bcd1f3fe8d4c430bb19ad5
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0xa0d22caf6217a488b1e97b646c5ed88e8a3020a607bcd1f3fe8d4c430bb19ad5
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs']
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs']
NEXT_PUBLIC_HOMEPAGE_HERO_BANNER_CONFIG={'background':['rgba(255, 238, 218, 1)'],'text_color':['rgba(25, 6, 2, 1)']}
NEXT_PUBLIC_HOMEPAGE_HERO_BANNER_CONFIG={'background':['rgba(255, 238, 218, 1)'],'text_color':['rgba(25, 6, 2, 1)']}
...
@@ -33,9 +35,8 @@ NEXT_PUBLIC_NETWORK_RPC_URL=https://sepolia-rpc.scroll.io
...
@@ -33,9 +35,8 @@ NEXT_PUBLIC_NETWORK_RPC_URL=https://sepolia-rpc.scroll.io
NEXT_PUBLIC_NETWORK_SHORT_NAME=Scroll Sepolia Testnet
NEXT_PUBLIC_NETWORK_SHORT_NAME=Scroll Sepolia Testnet
NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED=true
NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED=true
NEXT_PUBLIC_OG_IMAGE_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/og-images/scroll-testnet.png
NEXT_PUBLIC_OG_IMAGE_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/og-images/scroll-testnet.png
NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY=6Ld0iT8aAAAAAJdju0CmAwGjW7JTDvIw-Q5pwt5T
NEXT_PUBLIC_ROLLUP_L1_BASE_URL=https://eth-sepolia.blockscout.com
NEXT_PUBLIC_ROLLUP_TYPE=scroll
NEXT_PUBLIC_STATS_API_HOST=https://stats-scroll-sepolia.k8s-prod-2.blockscout.com
NEXT_PUBLIC_STATS_API_HOST=https://stats-scroll-sepolia.k8s-prod-2.blockscout.com
NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=blockscout
NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=blockscout
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
\ No newline at end of file
NEXT_PUBLIC_ROLLUP_TYPE=scroll
NEXT_PUBLIC_ROLLUP_L1_BASE_URL=https://eth-sepolia.blockscout.com/
\ No newline at end of file
pages/batches/[number].tsx
View file @
4aaf1f1a
...
@@ -15,16 +15,16 @@ const Batch = dynamic(() => {
...
@@ -15,16 +15,16 @@ const Batch = dynamic(() => {
}
}
switch
(
rollupFeature
.
type
)
{
switch
(
rollupFeature
.
type
)
{
//
case 'arbitrum':
case
'
arbitrum
'
:
//
return import('ui/pages/ArbitrumL2TxnBatch');
return
import
(
'
ui/pages/ArbitrumL2TxnBatch
'
);
//
case 'optimistic':
case
'
optimistic
'
:
//
return import('ui/pages/OptimisticL2TxnBatch');
return
import
(
'
ui/pages/OptimisticL2TxnBatch
'
);
case
'
zkEvm
'
:
case
'
zkEvm
'
:
return
import
(
'
ui/pages/ZkEvmL2TxnBatch
'
);
return
import
(
'
ui/pages/ZkEvmL2TxnBatch
'
);
case
'
zkSync
'
:
case
'
zkSync
'
:
return
import
(
'
ui/pages/ZkSyncL2TxnBatch
'
);
return
import
(
'
ui/pages/ZkSyncL2TxnBatch
'
);
//
case 'scroll':
case
'
scroll
'
:
//
return import('ui/pages/ScrollL2TxnBatch');
return
import
(
'
ui/pages/ScrollL2TxnBatch
'
);
}
}
throw
new
Error
(
'
Txn batches feature is not enabled.
'
);
throw
new
Error
(
'
Txn batches feature is not enabled.
'
);
},
{
ssr
:
false
});
},
{
ssr
:
false
});
...
...
pages/batches/celestia/[height]/[commitment].tsx
View file @
4aaf1f1a
...
@@ -9,24 +9,24 @@ import config from 'configs/app';
...
@@ -9,24 +9,24 @@ import config from 'configs/app';
const
rollupFeature
=
config
.
features
.
rollup
;
const
rollupFeature
=
config
.
features
.
rollup
;
//
const Batch = dynamic(() => {
const
Batch
=
dynamic
(()
=>
{
//
if (!rollupFeature.isEnabled) {
if
(
!
rollupFeature
.
isEnabled
)
{
//
throw new Error('Rollup feature is not enabled.');
throw
new
Error
(
'
Rollup feature is not enabled.
'
);
//
}
}
//
switch (rollupFeature.type) {
switch
(
rollupFeature
.
type
)
{
//
case 'arbitrum':
case
'
arbitrum
'
:
//
return import('ui/pages/ArbitrumL2TxnBatch');
return
import
(
'
ui/pages/ArbitrumL2TxnBatch
'
);
//
case 'optimistic':
case
'
optimistic
'
:
//
return import('ui/pages/OptimisticL2TxnBatch');
return
import
(
'
ui/pages/OptimisticL2TxnBatch
'
);
//
}
}
//
throw new Error('Celestia txn batches feature is not enabled.');
throw
new
Error
(
'
Celestia txn batches feature is not enabled.
'
);
//
}, { ssr: false });
},
{
ssr
:
false
});
const
Page
:
NextPage
<
Props
>
=
(
props
:
Props
)
=>
{
const
Page
:
NextPage
<
Props
>
=
(
props
:
Props
)
=>
{
return
(
return
(
<
PageNextJs
pathname=
"/batches/celestia/[height]/[commitment]"
query=
{
props
.
query
}
>
<
PageNextJs
pathname=
"/batches/celestia/[height]/[commitment]"
query=
{
props
.
query
}
>
{
/* <Batch/> */
}
<
Batch
/>
</
PageNextJs
>
</
PageNextJs
>
);
);
};
};
...
...
pages/batches/index.tsx
View file @
4aaf1f1a
...
@@ -17,12 +17,12 @@ const Batches = dynamic(() => {
...
@@ -17,12 +17,12 @@ const Batches = dynamic(() => {
return
import
(
'
ui/pages/ZkEvmL2TxnBatches
'
);
return
import
(
'
ui/pages/ZkEvmL2TxnBatches
'
);
case
'
zkSync
'
:
case
'
zkSync
'
:
return
import
(
'
ui/pages/ZkSyncL2TxnBatches
'
);
return
import
(
'
ui/pages/ZkSyncL2TxnBatches
'
);
//
case 'optimistic':
case
'
optimistic
'
:
//
return import('ui/pages/OptimisticL2TxnBatches');
return
import
(
'
ui/pages/OptimisticL2TxnBatches
'
);
//
case 'arbitrum':
case
'
arbitrum
'
:
//
return import('ui/pages/ArbitrumL2TxnBatches');
return
import
(
'
ui/pages/ArbitrumL2TxnBatches
'
);
//
case 'scroll':
case
'
scroll
'
:
//
return import('ui/pages/ScrollL2TxnBatches');
return
import
(
'
ui/pages/ScrollL2TxnBatches
'
);
}
}
throw
new
Error
(
'
Txn batches feature is not enabled.
'
);
throw
new
Error
(
'
Txn batches feature is not enabled.
'
);
},
{
ssr
:
false
});
},
{
ssr
:
false
});
...
...
pages/deposits/index.tsx
View file @
4aaf1f1a
...
@@ -8,13 +8,13 @@ import config from 'configs/app';
...
@@ -8,13 +8,13 @@ import config from 'configs/app';
const
rollupFeature
=
config
.
features
.
rollup
;
const
rollupFeature
=
config
.
features
.
rollup
;
const
Deposits
=
dynamic
(()
=>
{
const
Deposits
=
dynamic
(()
=>
{
//
if (rollupFeature.isEnabled && rollupFeature.type === 'optimistic') {
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
optimistic
'
)
{
//
return import('ui/pages/OptimisticL2Deposits');
return
import
(
'
ui/pages/OptimisticL2Deposits
'
);
//
}
}
//
if (rollupFeature.isEnabled && rollupFeature.type === 'arbitrum') {
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
arbitrum
'
)
{
//
return import('ui/pages/ArbitrumL2Deposits');
return
import
(
'
ui/pages/ArbitrumL2Deposits
'
);
//
}
}
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
shibarium
'
)
{
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
shibarium
'
)
{
return
import
(
'
ui/pages/ShibariumDeposits
'
);
return
import
(
'
ui/pages/ShibariumDeposits
'
);
...
@@ -24,9 +24,9 @@ const Deposits = dynamic(() => {
...
@@ -24,9 +24,9 @@ const Deposits = dynamic(() => {
return
import
(
'
ui/pages/ZkEvmL2Deposits
'
);
return
import
(
'
ui/pages/ZkEvmL2Deposits
'
);
}
}
//
if (rollupFeature.isEnabled && rollupFeature.type === 'scroll') {
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
scroll
'
)
{
//
return import('ui/pages/ScrollL2Deposits');
return
import
(
'
ui/pages/ScrollL2Deposits
'
);
//
}
}
throw
new
Error
(
'
Deposits feature is not enabled.
'
);
throw
new
Error
(
'
Deposits feature is not enabled.
'
);
},
{
ssr
:
false
});
},
{
ssr
:
false
});
...
...
pages/dispute-games/index.tsx
View file @
4aaf1f1a
...
@@ -4,12 +4,12 @@ import React from 'react';
...
@@ -4,12 +4,12 @@ import React from 'react';
import
PageNextJs
from
'
nextjs/PageNextJs
'
;
import
PageNextJs
from
'
nextjs/PageNextJs
'
;
//
const DisputeGames = dynamic(() => import('ui/pages/OptimisticL2DisputeGames'), { ssr: false });
const
DisputeGames
=
dynamic
(()
=>
import
(
'
ui/pages/OptimisticL2DisputeGames
'
),
{
ssr
:
false
});
const
Page
:
NextPage
=
()
=>
{
const
Page
:
NextPage
=
()
=>
{
return
(
return
(
<
PageNextJs
pathname=
"/dispute-games"
>
<
PageNextJs
pathname=
"/dispute-games"
>
{
/* <DisputeGames/> */
}
<
DisputeGames
/>
</
PageNextJs
>
</
PageNextJs
>
);
);
};
};
...
...
pages/output-roots/index.tsx
View file @
4aaf1f1a
...
@@ -4,12 +4,12 @@ import React from 'react';
...
@@ -4,12 +4,12 @@ import React from 'react';
import
PageNextJs
from
'
nextjs/PageNextJs
'
;
import
PageNextJs
from
'
nextjs/PageNextJs
'
;
//
const OutputRoots = dynamic(() => import('ui/pages/OptimisticL2OutputRoots'), { ssr: false });
const
OutputRoots
=
dynamic
(()
=>
import
(
'
ui/pages/OptimisticL2OutputRoots
'
),
{
ssr
:
false
});
const
Page
:
NextPage
=
()
=>
{
const
Page
:
NextPage
=
()
=>
{
return
(
return
(
<
PageNextJs
pathname=
"/output-roots"
>
<
PageNextJs
pathname=
"/output-roots"
>
{
/* <OutputRoots/> */
}
<
OutputRoots
/>
</
PageNextJs
>
</
PageNextJs
>
);
);
};
};
...
...
pages/txn-withdrawals/index.tsx
View file @
4aaf1f1a
...
@@ -7,18 +7,18 @@ import PageNextJs from 'nextjs/PageNextJs';
...
@@ -7,18 +7,18 @@ import PageNextJs from 'nextjs/PageNextJs';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
const
rollupFeature
=
config
.
features
.
rollup
;
const
rollupFeature
=
config
.
features
.
rollup
;
//
const Withdrawals = dynamic(() => {
const
Withdrawals
=
dynamic
(()
=>
{
//
if (rollupFeature.isEnabled && rollupFeature.type === 'arbitrum') {
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
arbitrum
'
)
{
//
return import('ui/pages/ArbitrumL2TxnWithdrawals');
return
import
(
'
ui/pages/ArbitrumL2TxnWithdrawals
'
);
//
}
}
//
throw new Error('Txn withdrawals feature is not enabled.');
throw
new
Error
(
'
Txn withdrawals feature is not enabled.
'
);
//
}, { ssr: false });
},
{
ssr
:
false
});
const
Page
:
NextPage
=
()
=>
{
const
Page
:
NextPage
=
()
=>
{
return
(
return
(
<
PageNextJs
pathname=
"/txn-withdrawals"
>
<
PageNextJs
pathname=
"/txn-withdrawals"
>
{
/* <Withdrawals/> */
}
<
Withdrawals
/>
</
PageNextJs
>
</
PageNextJs
>
);
);
};
};
...
...
pages/withdrawals/index.tsx
View file @
4aaf1f1a
...
@@ -9,13 +9,13 @@ const rollupFeature = config.features.rollup;
...
@@ -9,13 +9,13 @@ const rollupFeature = config.features.rollup;
const
beaconChainFeature
=
config
.
features
.
beaconChain
;
const
beaconChainFeature
=
config
.
features
.
beaconChain
;
const
Withdrawals
=
dynamic
(()
=>
{
const
Withdrawals
=
dynamic
(()
=>
{
//
if (rollupFeature.isEnabled && rollupFeature.type === 'optimistic') {
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
optimistic
'
)
{
//
return import('ui/pages/OptimisticL2Withdrawals');
return
import
(
'
ui/pages/OptimisticL2Withdrawals
'
);
//
}
}
//
if (rollupFeature.isEnabled && rollupFeature.type === 'arbitrum') {
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
arbitrum
'
)
{
//
return import('ui/pages/ArbitrumL2Withdrawals');
return
import
(
'
ui/pages/ArbitrumL2Withdrawals
'
);
//
}
}
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
shibarium
'
)
{
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
shibarium
'
)
{
return
import
(
'
ui/pages/ShibariumWithdrawals
'
);
return
import
(
'
ui/pages/ShibariumWithdrawals
'
);
...
@@ -25,9 +25,9 @@ const Withdrawals = dynamic(() => {
...
@@ -25,9 +25,9 @@ const Withdrawals = dynamic(() => {
return
import
(
'
ui/pages/ZkEvmL2Withdrawals
'
);
return
import
(
'
ui/pages/ZkEvmL2Withdrawals
'
);
}
}
//
if (rollupFeature.isEnabled && rollupFeature.type === 'scroll') {
if
(
rollupFeature
.
isEnabled
&&
rollupFeature
.
type
===
'
scroll
'
)
{
//
return import('ui/pages/ScrollL2Withdrawals');
return
import
(
'
ui/pages/ScrollL2Withdrawals
'
);
//
}
}
if
(
beaconChainFeature
.
isEnabled
)
{
if
(
beaconChainFeature
.
isEnabled
)
{
return
import
(
'
ui/pages/BeaconChainWithdrawals
'
);
return
import
(
'
ui/pages/BeaconChainWithdrawals
'
);
...
...
toolkit/components/CutLink/CutLinkDetails.tsx
View file @
4aaf1f1a
...
@@ -10,12 +10,13 @@ interface Props extends LinkProps {
...
@@ -10,12 +10,13 @@ interface Props extends LinkProps {
id
?:
string
;
id
?:
string
;
onClick
?:
()
=>
void
;
onClick
?:
()
=>
void
;
isExpanded
?:
boolean
;
isExpanded
?:
boolean
;
text
?:
[
string
,
string
];
}
}
const
ID
=
'
CutLink
'
;
const
ID
=
'
CutLink
'
;
const
CutLink
=
(
props
:
Props
)
=>
{
const
CutLink
=
(
props
:
Props
)
=>
{
const
{
children
,
id
=
ID
,
onClick
,
isExpanded
:
isExpandedProp
=
false
,
...
rest
}
=
props
;
const
{
children
,
id
=
ID
,
onClick
,
isExpanded
:
isExpandedProp
=
false
,
text
:
textProp
,
...
rest
}
=
props
;
const
[
isExpanded
,
setIsExpanded
]
=
React
.
useState
(
isExpandedProp
);
const
[
isExpanded
,
setIsExpanded
]
=
React
.
useState
(
isExpandedProp
);
...
@@ -36,7 +37,7 @@ const CutLink = (props: Props) => {
...
@@ -36,7 +37,7 @@ const CutLink = (props: Props) => {
});
});
},
[
isExpandedProp
,
id
]);
},
[
isExpandedProp
,
id
]);
const
text
=
isExpanded
?
'
Hide details
'
:
'
View details
'
;
const
text
=
isExpanded
?
(
textProp
?.[
1
]
??
'
Hide details
'
)
:
(
textProp
?.[
0
]
??
'
View details
'
)
;
return
(
return
(
<>
<>
...
...
ui/deposits/optimisticL2/OptimisticDepositsListItem.tsx
View file @
4aaf1f1a
...
@@ -4,7 +4,7 @@ import React from 'react';
...
@@ -4,7 +4,7 @@ import React from 'react';
import
type
{
OptimisticL2DepositsItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2DepositsItem
}
from
'
types/api/optimisticL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/S
keleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/s
keleton
'
;
import
AddressEntityL1
from
'
ui/shared/entities/address/AddressEntityL1
'
;
import
AddressEntityL1
from
'
ui/shared/entities/address/AddressEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
...
@@ -29,8 +29,6 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
...
@@ -29,8 +29,6 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
l1_block_number
}
number=
{
item
.
l1_block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -40,8 +38,6 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
...
@@ -40,8 +38,6 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l2_transaction_hash
}
hash=
{
item
.
l2_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -60,8 +56,6 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
...
@@ -60,8 +56,6 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l1_transaction_hash
}
hash=
{
item
.
l1_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -78,7 +72,7 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
...
@@ -78,7 +72,7 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Gas limit
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Gas limit
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
BigNumber
(
item
.
l2_transaction_gas_limit
).
toFormat
()
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
BigNumber
(
item
.
l2_transaction_gas_limit
).
toFormat
()
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Container
>
</
ListItemMobileGrid
.
Container
>
...
...
ui/deposits/optimisticL2/OptimisticDepositsTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2DepositsItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2DepositsItem
}
from
'
types/api/optimisticL2
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
OptimisticDepositsTableItem
from
'
./OptimisticDepositsTableItem
'
;
import
OptimisticDepositsTableItem
from
'
./OptimisticDepositsTableItem
'
;
...
@@ -15,23 +14,23 @@ import OptimisticDepositsTableItem from './OptimisticDepositsTableItem';
...
@@ -15,23 +14,23 @@ import OptimisticDepositsTableItem from './OptimisticDepositsTableItem';
const
OptimisticDepositsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
OptimisticDepositsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
style=
{
{
tableLayout
:
'
auto
'
}
}
minW=
"950px"
>
<
Table
Root
tableLayout=
"auto"
minW=
"950px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
>
L1 block No
</
Th
>
<
T
ableColumnHeader
>
L1 block No
</
TableColumnHeader
>
<
T
h
>
L2 txn hash
</
Th
>
<
T
ableColumnHeader
>
L2 txn hash
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
>
L1 txn hash
</
Th
>
<
T
ableColumnHeader
>
L1 txn hash
</
TableColumnHeader
>
<
T
h
>
L1 txn origin
</
Th
>
<
T
ableColumnHeader
>
L1 txn origin
</
TableColumnHeader
>
<
T
h
isNumeric
>
Gas limit
</
Th
>
<
T
ableColumnHeader
isNumeric
>
Gas limit
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
OptimisticDepositsTableItem
key=
{
item
.
l2_transaction_hash
+
(
isLoading
?
index
:
''
)
}
item=
{
item
}
isLoading=
{
isLoading
}
/>
<
OptimisticDepositsTableItem
key=
{
item
.
l2_transaction_hash
+
(
isLoading
?
index
:
''
)
}
item=
{
item
}
isLoading=
{
isLoading
}
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/deposits/optimisticL2/OptimisticDepositsTableItem.tsx
View file @
4aaf1f1a
import
{
Td
,
Tr
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2DepositsItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2DepositsItem
}
from
'
types/api/optimisticL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
AddressEntityL1
from
'
ui/shared/entities/address/AddressEntityL1
'
;
import
AddressEntityL1
from
'
ui/shared/entities/address/AddressEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
...
@@ -23,59 +23,53 @@ const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => {
...
@@ -23,59 +23,53 @@ const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => {
}
}
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
l1_block_number
}
number=
{
item
.
l1_block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l2_transaction_hash
}
hash=
{
item
.
l2_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
pr=
{
12
}
>
<
T
ableCell
verticalAlign=
"middle"
pr=
{
12
}
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
l1_block_timestamp
}
timestamp=
{
item
.
l1_block_timestamp
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
color=
"text_secondary"
color=
"text_secondary"
display=
"inline-block"
display=
"inline-block"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l1_transaction_hash
}
hash=
{
item
.
l1_transaction_hash
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
AddressEntityL1
<
AddressEntityL1
address=
{
{
hash
:
item
.
l1_transaction_origin
,
name
:
''
,
is_contract
:
false
,
is_verified
:
false
,
ens_domain_name
:
null
,
implementations
:
null
}
}
address=
{
{
hash
:
item
.
l1_transaction_origin
,
name
:
''
,
is_contract
:
false
,
is_verified
:
false
,
ens_domain_name
:
null
,
implementations
:
null
}
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
truncation=
"constant"
truncation=
"constant"
noCopy
noCopy
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
isNumeric
>
<
T
ableCell
verticalAlign=
"middle"
isNumeric
>
<
Skeleton
isLoaded=
{
!
isLoading
}
color=
"text_secondary"
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
color=
"text_secondary"
display=
"inline-block"
>
<
span
>
{
BigNumber
(
item
.
l2_transaction_gas_limit
).
toFormat
()
}
</
span
>
<
span
>
{
BigNumber
(
item
.
l2_transaction_gas_limit
).
toFormat
()
}
</
span
>
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
ui/deposits/scrollL2/ScrollL2DepositsListItem.tsx
View file @
4aaf1f1a
...
@@ -5,7 +5,7 @@ import type { ScrollL2MessageItem } from 'types/api/scrollL2';
...
@@ -5,7 +5,7 @@ import type { ScrollL2MessageItem } from 'types/api/scrollL2';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
Skeleton
from
'
ui/shared/chakra/S
keleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/s
keleton
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
...
@@ -31,15 +31,13 @@ const ScrollL2DepositsListItem = ({ item, isLoading }: Props) => {
...
@@ -31,15 +31,13 @@ const ScrollL2DepositsListItem = ({ item, isLoading }: Props) => {
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
origination_transaction_block_number
}
number=
{
item
.
origination_transaction_block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
id
}
{
item
.
id
}
</
Skeleton
>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -49,8 +47,6 @@ const ScrollL2DepositsListItem = ({ item, isLoading }: Props) => {
...
@@ -49,8 +47,6 @@ const ScrollL2DepositsListItem = ({ item, isLoading }: Props) => {
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
origination_transaction_hash
}
hash=
{
item
.
origination_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -70,8 +66,6 @@ const ScrollL2DepositsListItem = ({ item, isLoading }: Props) => {
...
@@ -70,8 +66,6 @@ const ScrollL2DepositsListItem = ({ item, isLoading }: Props) => {
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
completion_transaction_hash
}
hash=
{
item
.
completion_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
)
:
(
)
:
(
...
@@ -83,7 +77,7 @@ const ScrollL2DepositsListItem = ({ item, isLoading }: Props) => {
...
@@ -83,7 +77,7 @@ const ScrollL2DepositsListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Value
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Value
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
`${ valueStr } ${ config.chain.currency.symbol }`
}
{
`${ valueStr } ${ config.chain.currency.symbol }`
}
</
Skeleton
>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
...
ui/deposits/scrollL2/ScrollL2DepositsTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ScrollL2MessageItem
}
from
'
types/api/scrollL2
'
;
import
type
{
ScrollL2MessageItem
}
from
'
types/api/scrollL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
ScrollL2DepositsTableItem
from
'
./ScrollL2DepositsTableItem
'
;
import
ScrollL2DepositsTableItem
from
'
./ScrollL2DepositsTableItem
'
;
...
@@ -16,23 +15,23 @@ import ScrollL2DepositsTableItem from './ScrollL2DepositsTableItem';
...
@@ -16,23 +15,23 @@ import ScrollL2DepositsTableItem from './ScrollL2DepositsTableItem';
const
ScrollL2DepositsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
ScrollL2DepositsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
style=
{
{
tableLayout
:
'
auto
'
}
}
minW=
"950px"
>
<
Table
Root
tableLayout=
"auto"
minW=
"950px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
>
L1 block
</
Th
>
<
T
ableColumnHeader
>
L1 block
</
TableColumnHeader
>
<
T
h
>
Index
</
Th
>
<
T
ableColumnHeader
>
Index
</
TableColumnHeader
>
<
T
h
>
L1 txn hash
</
Th
>
<
T
ableColumnHeader
>
L1 txn hash
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
>
L2 txn hash
</
Th
>
<
T
ableColumnHeader
>
L2 txn hash
</
TableColumnHeader
>
<
T
h
isNumeric
>
Value
{
config
.
chain
.
currency
.
symbol
}
</
Th
>
<
T
ableColumnHeader
isNumeric
>
Value
{
config
.
chain
.
currency
.
symbol
}
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
ScrollL2DepositsTableItem
key=
{
String
(
item
.
id
)
+
(
isLoading
?
index
:
''
)
}
item=
{
item
}
isLoading=
{
isLoading
}
/>
<
ScrollL2DepositsTableItem
key=
{
String
(
item
.
id
)
+
(
isLoading
?
index
:
''
)
}
item=
{
item
}
isLoading=
{
isLoading
}
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/deposits/scrollL2/ScrollL2DepositsTableItem.tsx
View file @
4aaf1f1a
import
{
Td
,
Tr
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ScrollL2MessageItem
}
from
'
types/api/scrollL2
'
;
import
type
{
ScrollL2MessageItem
}
from
'
types/api/scrollL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
...
@@ -23,46 +24,40 @@ const ScrollL2DepositsTableItem = ({ item, isLoading }: Props) => {
...
@@ -23,46 +24,40 @@ const ScrollL2DepositsTableItem = ({ item, isLoading }: Props) => {
const
{
valueStr
}
=
getCurrencyValue
({
value
:
item
.
value
,
decimals
:
String
(
config
.
chain
.
currency
.
decimals
)
});
const
{
valueStr
}
=
getCurrencyValue
({
value
:
item
.
value
,
decimals
:
String
(
config
.
chain
.
currency
.
decimals
)
});
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
origination_transaction_block_number
}
number=
{
item
.
origination_transaction_block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
loading=
{
isLoading
}
>
<
span
>
{
item
.
id
}
</
span
>
<
span
>
{
item
.
id
}
</
span
>
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
origination_transaction_hash
}
hash=
{
item
.
origination_transaction_hash
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
pr=
{
12
}
>
<
T
ableCell
verticalAlign=
"middle"
pr=
{
12
}
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
origination_timestamp
}
timestamp=
{
item
.
origination_timestamp
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
color=
"text_secondary"
color=
"text_secondary"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
completion_transaction_hash
?
(
{
item
.
completion_transaction_hash
?
(
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
completion_transaction_hash
}
hash=
{
item
.
completion_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
/>
/>
...
@@ -71,13 +66,13 @@ const ScrollL2DepositsTableItem = ({ item, isLoading }: Props) => {
...
@@ -71,13 +66,13 @@ const ScrollL2DepositsTableItem = ({ item, isLoading }: Props) => {
Pending Claim
Pending Claim
</
chakra
.
span
>
</
chakra
.
span
>
)
}
)
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
isNumeric
>
<
T
ableCell
verticalAlign=
"middle"
isNumeric
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
<
span
>
{
valueStr
}
</
span
>
<
span
>
{
valueStr
}
</
span
>
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesListItem.tsx
View file @
4aaf1f1a
...
@@ -3,7 +3,7 @@ import React from 'react';
...
@@ -3,7 +3,7 @@ import React from 'react';
import
type
{
OptimisticL2DisputeGamesItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2DisputeGamesItem
}
from
'
types/api/optimisticL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/S
keleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/s
keleton
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
BlockEntityL2
from
'
ui/shared/entities/block/BlockEntityL2
'
;
import
BlockEntityL2
from
'
ui/shared/entities/block/BlockEntityL2
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
...
@@ -24,17 +24,17 @@ const OptimisticL2DisputeGamesListItem = ({ item, isLoading }: Props) => {
...
@@ -24,17 +24,17 @@ const OptimisticL2DisputeGamesListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
fontWeight=
{
600
}
color=
"text"
>
<
ListItemMobileGrid
.
Value
fontWeight=
{
600
}
color=
"text"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
index
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
index
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Game type
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Game type
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
game_type
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
game_type
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Address
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Address
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
color=
"text"
>
<
ListItemMobileGrid
.
Value
color=
"text"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"flex"
overflow=
"hidden"
w=
"100%"
alignItems=
"center"
>
<
Skeleton
loading=
{
isLoading
}
display=
"flex"
overflow=
"hidden"
w=
"100%"
alignItems=
"center"
>
<
HashStringShorten
hash=
{
item
.
contract_address
}
type=
"long"
/>
<
HashStringShorten
hash=
{
item
.
contract_address
}
type=
"long"
/>
<
CopyToClipboard
text=
{
item
.
contract_address
}
ml=
{
2
}
isLoading=
{
isLoading
}
/>
<
CopyToClipboard
text=
{
item
.
contract_address
}
ml=
{
2
}
isLoading=
{
isLoading
}
/>
</
Skeleton
>
</
Skeleton
>
...
@@ -45,8 +45,6 @@ const OptimisticL2DisputeGamesListItem = ({ item, isLoading }: Props) => {
...
@@ -45,8 +45,6 @@ const OptimisticL2DisputeGamesListItem = ({ item, isLoading }: Props) => {
<
BlockEntityL2
<
BlockEntityL2
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
number=
{
item
.
l2_block_number
}
number=
{
item
.
l2_block_number
}
fontSize=
"sm"
lineHeight=
{
5
}
noIcon
noIcon
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -62,7 +60,7 @@ const OptimisticL2DisputeGamesListItem = ({ item, isLoading }: Props) => {
...
@@ -62,7 +60,7 @@ const OptimisticL2DisputeGamesListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Status
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Status
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
color=
"text"
>
<
ListItemMobileGrid
.
Value
color=
"text"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
status
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
status
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
{
item
.
resolved_at
&&
(
{
item
.
resolved_at
&&
(
...
...
ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2DisputeGamesItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2DisputeGamesItem
}
from
'
types/api/optimisticL2
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
OptimisticL2DisputeGamesTableItem
from
'
./OptimisticL2DisputeGamesTableItem
'
;
import
OptimisticL2DisputeGamesTableItem
from
'
./OptimisticL2DisputeGamesTableItem
'
;
...
@@ -15,19 +14,19 @@ type Props = {
...
@@ -15,19 +14,19 @@ type Props = {
const
OptimisticL2DisputeGamesTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
OptimisticL2DisputeGamesTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
style=
{
{
tableLayout
:
'
auto
'
}
}
minW=
"950px"
>
<
Table
Root
tableLayout=
"auto"
minW=
"950px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
>
Index
</
Th
>
<
T
ableColumnHeader
>
Index
</
TableColumnHeader
>
<
T
h
>
Game type
</
Th
>
<
T
ableColumnHeader
>
Game type
</
TableColumnHeader
>
<
T
h
>
Address
</
Th
>
<
T
ableColumnHeader
>
Address
</
TableColumnHeader
>
<
T
h
>
L2 block #
</
Th
>
<
T
ableColumnHeader
>
L2 block #
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
>
Status
</
Th
>
<
T
ableColumnHeader
>
Status
</
TableColumnHeader
>
<
T
h
>
Resolution age
</
Th
>
<
T
ableColumnHeader
>
Resolution age
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
OptimisticL2DisputeGamesTableItem
<
OptimisticL2DisputeGamesTableItem
key=
{
String
(
item
.
index
)
+
(
isLoading
?
index
:
''
)
}
key=
{
String
(
item
.
index
)
+
(
isLoading
?
index
:
''
)
}
...
@@ -35,8 +34,8 @@ const OptimisticL2DisputeGamesTable = ({ items, top, isLoading }: Props) => {
...
@@ -35,8 +34,8 @@ const OptimisticL2DisputeGamesTable = ({ items, top, isLoading }: Props) => {
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesTableItem.tsx
View file @
4aaf1f1a
import
{
Flex
,
Td
,
Tr
}
from
'
@chakra-ui/react
'
;
import
{
Flex
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2DisputeGamesItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2DisputeGamesItem
}
from
'
types/api/optimisticL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
BlockEntityL2
from
'
ui/shared/entities/block/BlockEntityL2
'
;
import
BlockEntityL2
from
'
ui/shared/entities/block/BlockEntityL2
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
...
@@ -20,49 +21,47 @@ const OptimisticL2DisputeGamesTableItem = ({ item, isLoading }: Props) => {
...
@@ -20,49 +21,47 @@ const OptimisticL2DisputeGamesTableItem = ({ item, isLoading }: Props) => {
}
}
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
index
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
index
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
game_type
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
game_type
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Flex
overflow=
"hidden"
w=
"100%"
alignItems=
"center"
>
<
Flex
overflow=
"hidden"
w=
"100%"
alignItems=
"center"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
loading=
{
isLoading
}
>
<
HashStringShorten
hash=
{
item
.
contract_address
}
type=
"long"
/>
<
HashStringShorten
hash=
{
item
.
contract_address
}
type=
"long"
/>
</
Skeleton
>
</
Skeleton
>
<
CopyToClipboard
text=
{
item
.
contract_address
}
ml=
{
2
}
isLoading=
{
isLoading
}
/>
<
CopyToClipboard
text=
{
item
.
contract_address
}
ml=
{
2
}
isLoading=
{
isLoading
}
/>
</
Flex
>
</
Flex
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BlockEntityL2
<
BlockEntityL2
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
number=
{
item
.
l2_block_number
}
number=
{
item
.
l2_block_number
}
fontSize=
"sm"
lineHeight=
{
5
}
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
created_at
}
timestamp=
{
item
.
created_at
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
display=
"inline-block"
display=
"inline-block"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
status
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
status
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
>
<
T
ableCell
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
resolved_at
}
timestamp=
{
item
.
resolved_at
}
fallbackText=
"N/A"
fallbackText=
"N/A"
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
display=
"inline-block"
display=
"inline-block"
/>
/>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
ui/messages/ArbitrumL2Messages.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
}
from
'
@chakra-ui/react
'
;
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
ARBITRUM_MESSAGES_ITEM
}
from
'
stubs/arbitrumL2
'
;
import
{
ARBITRUM_MESSAGES_ITEM
}
from
'
stubs/arbitrumL2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
ArbitrumL2MessagesListItem
from
'
ui/messages/ArbitrumL2MessagesListItem
'
;
import
ArbitrumL2MessagesListItem
from
'
ui/messages/ArbitrumL2MessagesListItem
'
;
import
ArbitrumL2MessagesTable
from
'
ui/messages/ArbitrumL2MessagesTable
'
;
import
ArbitrumL2MessagesTable
from
'
ui/messages/ArbitrumL2MessagesTable
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -43,7 +43,7 @@ const ArbitrumL2Messages = ({ direction }: Props) => {
...
@@ -43,7 +43,7 @@ const ArbitrumL2Messages = ({ direction }: Props) => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
ArbitrumL2MessagesListItem
<
ArbitrumL2MessagesListItem
key=
{
String
(
item
.
id
)
+
(
isPlaceholderData
?
index
:
''
)
}
key=
{
String
(
item
.
id
)
+
(
isPlaceholderData
?
index
:
''
)
}
...
@@ -52,15 +52,15 @@ const ArbitrumL2Messages = ({ direction }: Props) => {
...
@@ -52,15 +52,15 @@ const ArbitrumL2Messages = ({ direction }: Props) => {
direction=
{
direction
}
direction=
{
direction
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
ArbitrumL2MessagesTable
<
ArbitrumL2MessagesTable
items=
{
data
.
items
}
items=
{
data
.
items
}
direction=
{
direction
}
direction=
{
direction
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -71,7 +71,7 @@ const ArbitrumL2Messages = ({ direction }: Props) => {
...
@@ -71,7 +71,7 @@ const ArbitrumL2Messages = ({ direction }: Props) => {
return
(
return
(
<
Skeleton
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
}
loading=
{
countersQuery
.
isPlaceholderData
}
display=
"inline-block"
display=
"inline-block"
>
>
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
{
type
}
found
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
{
type
}
found
...
@@ -91,11 +91,12 @@ const ArbitrumL2Messages = ({ direction }: Props) => {
...
@@ -91,11 +91,12 @@ const ArbitrumL2Messages = ({ direction }: Props) => {
/>
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
.
length
}
emptyText=
{
`There are no ${ type }.`
}
emptyText=
{
`There are no ${ type }.`
}
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/messages/ArbitrumL2MessagesListItem.tsx
View file @
4aaf1f1a
...
@@ -6,12 +6,12 @@ import type { ArbitrumL2MessagesItem } from 'types/api/arbitrumL2';
...
@@ -6,12 +6,12 @@ import type { ArbitrumL2MessagesItem } from 'types/api/arbitrumL2';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ArbitrumL2MessageStatus
from
'
ui/shared/statusTag/ArbitrumL2MessageStatus
'
;
import
ArbitrumL2MessageStatus
from
'
ui/shared/statusTag/ArbitrumL2MessageStatus
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
...
@@ -41,8 +41,6 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
...
@@ -41,8 +41,6 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
origination_transaction_block_number
}
number=
{
item
.
origination_transaction_block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
/>
/>
)
:
<
chakra
.
span
>
N/A
</
chakra
.
span
>
}
)
:
<
chakra
.
span
>
N/A
</
chakra
.
span
>
}
...
@@ -58,8 +56,6 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
...
@@ -58,8 +56,6 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
address=
{
{
hash
:
item
.
origination_address
}
}
address=
{
{
hash
:
item
.
origination_address
}
}
truncation=
"constant"
truncation=
"constant"
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -68,7 +64,7 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
...
@@ -68,7 +64,7 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Message #
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Message #
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
id
}
{
item
.
id
}
</
Skeleton
>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -79,8 +75,6 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
...
@@ -79,8 +75,6 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
l2TxHash
}
hash=
{
l2TxHash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
)
:
(
)
:
(
...
@@ -106,7 +100,7 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
...
@@ -106,7 +100,7 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Status
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Status
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
{
item
.
status
===
'
confirmed
'
&&
direction
===
'
from-rollup
'
?
{
item
.
status
===
'
confirmed
'
&&
direction
===
'
from-rollup
'
?
<
Link
Internal
href=
{
route
({
pathname
:
'
/txn-withdrawals
'
,
query
:
{
q
:
item
.
origination_transaction_hash
}
})
}
>
Ready for relay
</
LinkInternal
>
:
<
Link
href=
{
route
({
pathname
:
'
/txn-withdrawals
'
,
query
:
{
q
:
item
.
origination_transaction_hash
}
})
}
>
Ready for relay
</
Link
>
:
<
ArbitrumL2MessageStatus
status=
{
item
.
status
}
isLoading=
{
isLoading
}
/>
}
<
ArbitrumL2MessageStatus
status=
{
item
.
status
}
isLoading=
{
isLoading
}
/>
}
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -116,8 +110,6 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
...
@@ -116,8 +110,6 @@ const ArbitrumL2MessagesListItem = ({ item, isLoading, direction }: Props) => {
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
l1TxHash
}
hash=
{
l1TxHash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
)
:
(
)
:
(
...
...
ui/messages/ArbitrumL2MessagesTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ArbitrumL2MessagesItem
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2MessagesItem
}
from
'
types/api/arbitrumL2
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
type
{
MessagesDirection
}
from
'
./ArbitrumL2Messages
'
;
import
type
{
MessagesDirection
}
from
'
./ArbitrumL2Messages
'
;
import
ArbitrumL2MessagesTableItem
from
'
./ArbitrumL2MessagesTableItem
'
;
import
ArbitrumL2MessagesTableItem
from
'
./ArbitrumL2MessagesTableItem
'
;
...
@@ -17,19 +16,19 @@ import ArbitrumL2MessagesTableItem from './ArbitrumL2MessagesTableItem';
...
@@ -17,19 +16,19 @@ import ArbitrumL2MessagesTableItem from './ArbitrumL2MessagesTableItem';
const
ArbitrumL2MessagesTable
=
({
items
,
direction
,
top
,
isLoading
}:
Props
)
=>
{
const
ArbitrumL2MessagesTable
=
({
items
,
direction
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
style=
{
{
tableLayout
:
'
auto
'
}
}
minW=
"950px"
>
<
Table
Root
tableLayout=
"auto"
minW=
"950px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
{
direction
===
'
to-rollup
'
&&
<
T
h
>
L1 block
</
Th
>
}
{
direction
===
'
to-rollup
'
&&
<
T
ableColumnHeader
>
L1 block
</
TableColumnHeader
>
}
{
direction
===
'
from-rollup
'
&&
<
T
h
>
From
</
Th
>
}
{
direction
===
'
from-rollup
'
&&
<
T
ableColumnHeader
>
From
</
TableColumnHeader
>
}
<
T
h
>
Message #
</
Th
>
<
T
ableColumnHeader
>
Message #
</
TableColumnHeader
>
<
T
h
>
L2 transaction
</
Th
>
<
T
ableColumnHeader
>
L2 transaction
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
>
Status
</
Th
>
<
T
ableColumnHeader
>
Status
</
TableColumnHeader
>
<
T
h
>
L1 transaction
</
Th
>
<
T
ableColumnHeader
>
L1 transaction
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
ArbitrumL2MessagesTableItem
<
ArbitrumL2MessagesTableItem
key=
{
String
(
item
.
id
)
+
(
isLoading
?
index
:
''
)
}
key=
{
String
(
item
.
id
)
+
(
isLoading
?
index
:
''
)
}
...
@@ -38,8 +37,8 @@ const ArbitrumL2MessagesTable = ({ items, direction, top, isLoading }: Props) =>
...
@@ -38,8 +37,8 @@ const ArbitrumL2MessagesTable = ({ items, direction, top, isLoading }: Props) =>
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/messages/ArbitrumL2MessagesTableItem.tsx
View file @
4aaf1f1a
import
{
Td
,
Tr
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ArbitrumL2MessagesItem
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2MessagesItem
}
from
'
types/api/arbitrumL2
'
;
...
@@ -6,12 +6,13 @@ import type { ArbitrumL2MessagesItem } from 'types/api/arbitrumL2';
...
@@ -6,12 +6,13 @@ import type { ArbitrumL2MessagesItem } from 'types/api/arbitrumL2';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
ArbitrumL2MessageStatus
from
'
ui/shared/statusTag/ArbitrumL2MessageStatus
'
;
import
ArbitrumL2MessageStatus
from
'
ui/shared/statusTag/ArbitrumL2MessageStatus
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
...
@@ -30,45 +31,39 @@ const ArbitrumL2MessagesTableItem = ({ item, direction, isLoading }: Props) => {
...
@@ -30,45 +31,39 @@ const ArbitrumL2MessagesTableItem = ({ item, direction, isLoading }: Props) => {
const
l2TxHash
=
direction
===
'
from-rollup
'
?
item
.
origination_transaction_hash
:
item
.
completion_transaction_hash
;
const
l2TxHash
=
direction
===
'
from-rollup
'
?
item
.
origination_transaction_hash
:
item
.
completion_transaction_hash
;
return
(
return
(
<
T
r
>
<
T
ableRow
>
{
direction
===
'
to-rollup
'
&&
(
{
direction
===
'
to-rollup
'
&&
(
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
origination_transaction_block_number
?
(
{
item
.
origination_transaction_block_number
?
(
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
origination_transaction_block_number
}
number=
{
item
.
origination_transaction_block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
noIcon
noIcon
/>
/>
)
:
<
chakra
.
span
color=
"text_secondary"
>
N/A
</
chakra
.
span
>
}
)
:
<
chakra
.
span
color=
"text_secondary"
>
N/A
</
chakra
.
span
>
}
</
T
d
>
</
T
ableCell
>
)
}
)
}
{
direction
===
'
from-rollup
'
&&
(
{
direction
===
'
from-rollup
'
&&
(
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
AddressEntity
<
AddressEntity
address=
{
{
hash
:
item
.
origination_address
}
}
address=
{
{
hash
:
item
.
origination_address
}
}
truncation=
"constant"
truncation=
"constant"
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
/>
/>
</
T
d
>
</
T
ableCell
>
)
}
)
}
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
loading=
{
isLoading
}
>
<
span
>
{
item
.
id
}
</
span
>
<
span
>
{
item
.
id
}
</
span
>
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
l2TxHash
?
(
{
l2TxHash
?
(
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
l2TxHash
}
hash=
{
l2TxHash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
/>
/>
...
@@ -77,36 +72,34 @@ const ArbitrumL2MessagesTableItem = ({ item, direction, isLoading }: Props) => {
...
@@ -77,36 +72,34 @@ const ArbitrumL2MessagesTableItem = ({ item, direction, isLoading }: Props) => {
N/A
N/A
</
chakra
.
span
>
</
chakra
.
span
>
)
}
)
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
pr=
{
12
}
>
<
T
ableCell
verticalAlign=
"middle"
pr=
{
12
}
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
origination_timestamp
}
timestamp=
{
item
.
origination_timestamp
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
color=
"text_secondary"
color=
"text_secondary"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
status
===
'
confirmed
'
&&
direction
===
'
from-rollup
'
?
{
item
.
status
===
'
confirmed
'
&&
direction
===
'
from-rollup
'
?
<
Link
Internal
href=
{
route
({
pathname
:
'
/txn-withdrawals
'
,
query
:
{
q
:
item
.
origination_transaction_hash
}
})
}
>
Ready for relay
</
LinkInternal
>
:
<
Link
href=
{
route
({
pathname
:
'
/txn-withdrawals
'
,
query
:
{
q
:
item
.
origination_transaction_hash
}
})
}
>
Ready for relay
</
Link
>
:
<
ArbitrumL2MessageStatus
status=
{
item
.
status
}
isLoading=
{
isLoading
}
/>
}
<
ArbitrumL2MessageStatus
status=
{
item
.
status
}
isLoading=
{
isLoading
}
/>
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
l1TxHash
?
(
{
l1TxHash
?
(
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
l1TxHash
}
hash=
{
l1TxHash
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
)
:
(
)
:
(
<
chakra
.
span
color=
"text_secondary"
>
<
chakra
.
span
color=
"text_secondary"
>
N/A
N/A
</
chakra
.
span
>
</
chakra
.
span
>
)
}
)
}
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
ui/outputRoots/optimisticL2/OptimisticL2OutputRootsListItem.tsx
View file @
4aaf1f1a
...
@@ -4,7 +4,7 @@ import React from 'react';
...
@@ -4,7 +4,7 @@ import React from 'react';
import
type
{
OptimisticL2OutputRootsItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2OutputRootsItem
}
from
'
types/api/optimisticL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/S
keleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/s
keleton
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
BlockEntityL2
from
'
ui/shared/entities/block/BlockEntityL2
'
;
import
BlockEntityL2
from
'
ui/shared/entities/block/BlockEntityL2
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
...
@@ -26,7 +26,7 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
...
@@ -26,7 +26,7 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
L2 output index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
L2 output index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
fontWeight=
{
600
}
color=
"text"
>
<
ListItemMobileGrid
.
Value
fontWeight=
{
600
}
color=
"text"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
l2_output_index
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
l2_output_index
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Age
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Age
</
ListItemMobileGrid
.
Label
>
...
@@ -43,8 +43,6 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
...
@@ -43,8 +43,6 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
<
BlockEntityL2
<
BlockEntityL2
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
number=
{
item
.
l2_block_number
}
number=
{
item
.
l2_block_number
}
fontSize=
"sm"
lineHeight=
{
5
}
noIcon
noIcon
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -54,8 +52,6 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
...
@@ -54,8 +52,6 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l1_transaction_hash
}
hash=
{
item
.
l1_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -63,7 +59,7 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
...
@@ -63,7 +59,7 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Output root
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Output root
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Flex
overflow=
"hidden"
whiteSpace=
"nowrap"
alignItems=
"center"
w=
"100%"
justifyContent=
"start"
>
<
Flex
overflow=
"hidden"
whiteSpace=
"nowrap"
alignItems=
"center"
w=
"100%"
justifyContent=
"start"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
color=
"text_secondary"
>
<
Skeleton
loading=
{
isLoading
}
color=
"text_secondary"
>
<
HashStringShorten
hash=
{
item
.
output_root
}
type=
"long"
/>
<
HashStringShorten
hash=
{
item
.
output_root
}
type=
"long"
/>
</
Skeleton
>
</
Skeleton
>
<
CopyToClipboard
text=
{
item
.
output_root
}
isLoading=
{
isLoading
}
/>
<
CopyToClipboard
text=
{
item
.
output_root
}
isLoading=
{
isLoading
}
/>
...
...
ui/outputRoots/optimisticL2/OptimisticL2OutputRootsTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2OutputRootsItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2OutputRootsItem
}
from
'
types/api/optimisticL2
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
OptimisticL2OutputRootsTableItem
from
'
./OptimisticL2OutputRootsTableItem
'
;
import
OptimisticL2OutputRootsTableItem
from
'
./OptimisticL2OutputRootsTableItem
'
;
...
@@ -15,17 +14,17 @@ type Props = {
...
@@ -15,17 +14,17 @@ type Props = {
const
OptimisticL2OutputRootsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
OptimisticL2OutputRootsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
minW=
"900px"
>
<
Table
Root
minW=
"900px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
width=
"160px"
>
L2 output index
</
Th
>
<
T
ableColumnHeader
width=
"160px"
>
L2 output index
</
TableColumnHeader
>
<
T
h
width=
"20%"
>
Age
</
Th
>
<
T
ableColumnHeader
width=
"20%"
>
Age
</
TableColumnHeader
>
<
T
h
width=
"20%"
>
L2 block #
</
Th
>
<
T
ableColumnHeader
width=
"20%"
>
L2 block #
</
TableColumnHeader
>
<
T
h
width=
"30%"
>
L1 txn hash
</
Th
>
<
T
ableColumnHeader
width=
"30%"
>
L1 txn hash
</
TableColumnHeader
>
<
T
h
width=
"30%"
>
Output root
</
Th
>
<
T
ableColumnHeader
width=
"30%"
>
Output root
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
OptimisticL2OutputRootsTableItem
<
OptimisticL2OutputRootsTableItem
key=
{
item
.
l2_output_index
+
(
Number
(
isLoading
?
index
:
''
)
?
String
(
index
)
:
''
)
}
key=
{
item
.
l2_output_index
+
(
Number
(
isLoading
?
index
:
''
)
?
String
(
index
)
:
''
)
}
...
@@ -33,8 +32,8 @@ const OptimisticL2OutputRootsTable = ({ items, top, isLoading }: Props) => {
...
@@ -33,8 +32,8 @@ const OptimisticL2OutputRootsTable = ({ items, top, isLoading }: Props) => {
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/outputRoots/optimisticL2/OptimisticL2OutputRootsTableItem.tsx
View file @
4aaf1f1a
import
{
Flex
,
Td
,
Tr
}
from
'
@chakra-ui/react
'
;
import
{
Flex
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2OutputRootsItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2OutputRootsItem
}
from
'
types/api/optimisticL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
BlockEntityL2
from
'
ui/shared/entities/block/BlockEntityL2
'
;
import
BlockEntityL2
from
'
ui/shared/entities/block/BlockEntityL2
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
...
@@ -21,47 +22,43 @@ const OptimisticL2OutputRootsTableItem = ({ item, isLoading }: Props) => {
...
@@ -21,47 +22,43 @@ const OptimisticL2OutputRootsTableItem = ({ item, isLoading }: Props) => {
}
}
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
l2_output_index
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
l2_output_index
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
l1_timestamp
}
timestamp=
{
item
.
l1_timestamp
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
display=
"inline-block"
display=
"inline-block"
color=
"text_secondary"
color=
"text_secondary"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BlockEntityL2
<
BlockEntityL2
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
number=
{
item
.
l2_block_number
}
number=
{
item
.
l2_block_number
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
pr=
{
12
}
>
<
T
ableCell
verticalAlign=
"middle"
pr=
{
12
}
>
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l1_transaction_hash
}
hash=
{
item
.
l1_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
noIcon
noIcon
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Flex
overflow=
"hidden"
w=
"100%"
alignItems=
"center"
>
<
Flex
overflow=
"hidden"
w=
"100%"
alignItems=
"center"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
loading=
{
isLoading
}
>
<
HashStringShorten
hash=
{
item
.
output_root
}
type=
"long"
/>
<
HashStringShorten
hash=
{
item
.
output_root
}
type=
"long"
/>
</
Skeleton
>
</
Skeleton
>
<
CopyToClipboard
text=
{
item
.
output_root
}
ml=
{
2
}
isLoading=
{
isLoading
}
/>
<
CopyToClipboard
text=
{
item
.
output_root
}
ml=
{
2
}
isLoading=
{
isLoading
}
/>
</
Flex
>
</
Flex
>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
ui/pages/ArbitrumL2TxnBatch.tsx
View file @
4aaf1f1a
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
RoutedTab
}
from
'
ui/shared/
Tabs/types
'
;
import
type
{
TabItemRegular
}
from
'
toolkit/components/Adaptive
Tabs/types
'
;
import
{
useAppContext
}
from
'
lib/contexts/app
'
;
import
{
useAppContext
}
from
'
lib/contexts/app
'
;
import
throwOnAbsentParamError
from
'
lib/errors/throwOnAbsentParamError
'
;
import
throwOnAbsentParamError
from
'
lib/errors/throwOnAbsentParamError
'
;
...
@@ -11,13 +11,13 @@ import getQueryParamString from 'lib/router/getQueryParamString';
...
@@ -11,13 +11,13 @@ import getQueryParamString from 'lib/router/getQueryParamString';
import
{
BLOCK
}
from
'
stubs/block
'
;
import
{
BLOCK
}
from
'
stubs/block
'
;
import
{
TX
}
from
'
stubs/tx
'
;
import
{
TX
}
from
'
stubs/tx
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
RoutedTabs
from
'
toolkit/components/RoutedTabs/RoutedTabs
'
;
import
RoutedTabsSkeleton
from
'
toolkit/components/RoutedTabs/RoutedTabsSkeleton
'
;
import
BlocksContent
from
'
ui/blocks/BlocksContent
'
;
import
BlocksContent
from
'
ui/blocks/BlocksContent
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
Pagination
from
'
ui/shared/pagination/Pagination
'
;
import
Pagination
from
'
ui/shared/pagination/Pagination
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
RoutedTabs
from
'
ui/shared/Tabs/RoutedTabs
'
;
import
TabsSkeleton
from
'
ui/shared/Tabs/TabsSkeleton
'
;
import
ArbitrumL2TxnBatchDetails
from
'
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails
'
;
import
ArbitrumL2TxnBatchDetails
from
'
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails
'
;
import
useBatchQuery
from
'
ui/txnBatches/arbitrumL2/useBatchQuery
'
;
import
useBatchQuery
from
'
ui/txnBatches/arbitrumL2/useBatchQuery
'
;
import
TxsWithFrontendSorting
from
'
ui/txs/TxsWithFrontendSorting
'
;
import
TxsWithFrontendSorting
from
'
ui/txs/TxsWithFrontendSorting
'
;
...
@@ -81,7 +81,7 @@ const ArbitrumL2TxnBatch = () => {
...
@@ -81,7 +81,7 @@ const ArbitrumL2TxnBatch = () => {
const
hasPagination
=
!
isMobile
&&
pagination
?.
isVisible
;
const
hasPagination
=
!
isMobile
&&
pagination
?.
isVisible
;
const
tabs
:
Array
<
RoutedTab
>
=
React
.
useMemo
(()
=>
([
const
tabs
:
Array
<
TabItemRegular
>
=
React
.
useMemo
(()
=>
([
{
id
:
'
index
'
,
title
:
'
Details
'
,
component
:
<
ArbitrumL2TxnBatchDetails
query=
{
batchQuery
}
/>
},
{
id
:
'
index
'
,
title
:
'
Details
'
,
component
:
<
ArbitrumL2TxnBatchDetails
query=
{
batchQuery
}
/>
},
{
{
id
:
'
txs
'
,
id
:
'
txs
'
,
...
@@ -117,10 +117,10 @@ const ArbitrumL2TxnBatch = () => {
...
@@ -117,10 +117,10 @@ const ArbitrumL2TxnBatch = () => {
isLoading=
{
batchQuery
.
isPlaceholderData
}
isLoading=
{
batchQuery
.
isPlaceholderData
}
/>
/>
{
batchQuery
.
isPlaceholderData
?
{
batchQuery
.
isPlaceholderData
?
<
TabsSkeleton
tabs=
{
tabs
}
/>
:
(
<
Routed
TabsSkeleton
tabs=
{
tabs
}
/>
:
(
<
RoutedTabs
<
RoutedTabs
tabs=
{
tabs
}
tabs=
{
tabs
}
tabL
istProps=
{
isMobile
?
undefined
:
TAB_LIST_PROPS
}
l
istProps=
{
isMobile
?
undefined
:
TAB_LIST_PROPS
}
rightSlot=
{
hasPagination
&&
pagination
?
<
Pagination
{
...
(
pagination
)
}
/>
:
null
}
rightSlot=
{
hasPagination
&&
pagination
?
<
Pagination
{
...
(
pagination
)
}
/>
:
null
}
stickyEnabled=
{
hasPagination
}
stickyEnabled=
{
hasPagination
}
/>
/>
...
...
ui/pages/ArbitrumL2TxnBatches.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Text
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
ARBITRUM_L2_TXN_BATCHES_ITEM
}
from
'
stubs/arbitrumL2
'
;
import
{
ARBITRUM_L2_TXN_BATCHES_ITEM
}
from
'
stubs/arbitrumL2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -38,7 +38,7 @@ const ArbitrumL2TxnBatches = () => {
...
@@ -38,7 +38,7 @@ const ArbitrumL2TxnBatches = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
ArbitrumL2TxnBatchesListItem
<
ArbitrumL2TxnBatchesListItem
key=
{
item
.
number
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
key=
{
item
.
number
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
...
@@ -46,10 +46,10 @@ const ArbitrumL2TxnBatches = () => {
...
@@ -46,10 +46,10 @@ const ArbitrumL2TxnBatches = () => {
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
ArbitrumL2TxnBatchesTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
ArbitrumL2TxnBatchesTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -59,7 +59,7 @@ const ArbitrumL2TxnBatches = () => {
...
@@ -59,7 +59,7 @@ const ArbitrumL2TxnBatches = () => {
}
}
return
(
return
(
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
&&
!
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
<
Skeleton
loading=
{
countersQuery
.
isPlaceholderData
||
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
Txn batch
Txn batch
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
number
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
number
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
number
}
</
Text
>
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
number
}
</
Text
>
...
@@ -75,11 +75,12 @@ const ArbitrumL2TxnBatches = () => {
...
@@ -75,11 +75,12 @@ const ArbitrumL2TxnBatches = () => {
<
PageTitle
title=
"Txn batches"
withTextAd
/>
<
PageTitle
title=
"Txn batches"
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
.
length
}
emptyText=
"There are no txn batches."
emptyText=
"There are no txn batches."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/ArbitrumL2TxnWithdrawals.tsx
View file @
4aaf1f1a
...
@@ -82,7 +82,7 @@ const ArbitrumL2TxnWithdrawals = () => {
...
@@ -82,7 +82,7 @@ const ArbitrumL2TxnWithdrawals = () => {
name=
"tx_hash"
name=
"tx_hash"
w=
{
{
base
:
'
100%
'
,
lg
:
'
700px
'
}
}
w=
{
{
base
:
'
100%
'
,
lg
:
'
700px
'
}
}
mt=
{
6
}
mt=
{
6
}
size=
"
xs
"
size=
"
sm
"
placeholder=
"Search by transaction hash"
placeholder=
"Search by transaction hash"
initialValue=
{
searchTerm
}
initialValue=
{
searchTerm
}
onChange=
{
handleSearchTermChange
}
onChange=
{
handleSearchTermChange
}
...
@@ -94,13 +94,14 @@ const ArbitrumL2TxnWithdrawals = () => {
...
@@ -94,13 +94,14 @@ const ArbitrumL2TxnWithdrawals = () => {
<
DataListDisplay
<
DataListDisplay
mt=
{
6
}
mt=
{
6
}
isError=
{
isError
}
isError=
{
isError
}
items
=
{
searchTerm
?
data
?.
items
:
undefined
}
items
Num=
{
searchTerm
?
data
?.
items
.
length
:
undefined
}
filterProps=
{
{
filterProps=
{
{
emptyFilteredText
:
`Couldn${ apos }t find any withdrawals for your transaction.`
,
emptyFilteredText
:
`Couldn${ apos }t find any withdrawals for your transaction.`
,
hasActiveFilters
:
Boolean
(
searchTerm
),
hasActiveFilters
:
Boolean
(
searchTerm
),
}
}
}
}
content=
{
content
}
>
/>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/OptimisticL2Deposits.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
}
from
'
@chakra-ui/react
'
;
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
L2_DEPOSIT_ITEM
}
from
'
stubs/L2
'
;
import
{
L2_DEPOSIT_ITEM
}
from
'
stubs/L2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
OptimisticDepositsListItem
from
'
ui/deposits/optimisticL2/OptimisticDepositsListItem
'
;
import
OptimisticDepositsListItem
from
'
ui/deposits/optimisticL2/OptimisticDepositsListItem
'
;
import
OptimisticDepositsTable
from
'
ui/deposits/optimisticL2/OptimisticDepositsTable
'
;
import
OptimisticDepositsTable
from
'
ui/deposits/optimisticL2/OptimisticDepositsTable
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -40,7 +40,7 @@ const OptimisticL2Deposits = () => {
...
@@ -40,7 +40,7 @@ const OptimisticL2Deposits = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
OptimisticDepositsListItem
<
OptimisticDepositsListItem
key=
{
item
.
l2_transaction_hash
+
(
isPlaceholderData
?
index
:
''
)
}
key=
{
item
.
l2_transaction_hash
+
(
isPlaceholderData
?
index
:
''
)
}
...
@@ -48,10 +48,10 @@ const OptimisticL2Deposits = () => {
...
@@ -48,10 +48,10 @@ const OptimisticL2Deposits = () => {
item=
{
item
}
item=
{
item
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
OptimisticDepositsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
OptimisticDepositsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -61,10 +61,7 @@ const OptimisticL2Deposits = () => {
...
@@ -61,10 +61,7 @@ const OptimisticL2Deposits = () => {
}
}
return
(
return
(
<
Skeleton
<
Skeleton
loading=
{
countersQuery
.
isPlaceholderData
}
display=
"inline-block"
>
isLoaded=
{
!
countersQuery
.
isPlaceholderData
}
display=
"inline-block"
>
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
deposits found
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
deposits found
</
Skeleton
>
</
Skeleton
>
);
);
...
@@ -77,11 +74,12 @@ const OptimisticL2Deposits = () => {
...
@@ -77,11 +74,12 @@ const OptimisticL2Deposits = () => {
<
PageTitle
title=
{
`Deposits (L1${ nbsp }${ rightLineArrow }${ nbsp }L2)`
}
withTextAd
/>
<
PageTitle
title=
{
`Deposits (L1${ nbsp }${ rightLineArrow }${ nbsp }L2)`
}
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no deposits."
emptyText=
"There are no deposits."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/OptimisticL2DisputeGames.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Text
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
L2_DISPUTE_GAMES_ITEM
}
from
'
stubs/L2
'
;
import
{
L2_DISPUTE_GAMES_ITEM
}
from
'
stubs/L2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
OptimisticL2DisputeGamesListItem
from
'
ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesListItem
'
;
import
OptimisticL2DisputeGamesListItem
from
'
ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesListItem
'
;
import
OptimisticL2DisputeGamesTable
from
'
ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesTable
'
;
import
OptimisticL2DisputeGamesTable
from
'
ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesTable
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -38,7 +38,7 @@ const OptimisticL2DisputeGames = () => {
...
@@ -38,7 +38,7 @@ const OptimisticL2DisputeGames = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
OptimisticL2DisputeGamesListItem
<
OptimisticL2DisputeGamesListItem
key=
{
item
.
index
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
key=
{
item
.
index
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
...
@@ -46,10 +46,10 @@ const OptimisticL2DisputeGames = () => {
...
@@ -46,10 +46,10 @@ const OptimisticL2DisputeGames = () => {
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
OptimisticL2DisputeGamesTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
OptimisticL2DisputeGamesTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -59,7 +59,7 @@ const OptimisticL2DisputeGames = () => {
...
@@ -59,7 +59,7 @@ const OptimisticL2DisputeGames = () => {
}
}
return
(
return
(
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
&&
!
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
<
Skeleton
loading=
{
countersQuery
.
isPlaceholderData
||
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
Dispute game index
Dispute game index
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
index
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
index
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
index
}
</
Text
>
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
index
}
</
Text
>
...
@@ -75,11 +75,12 @@ const OptimisticL2DisputeGames = () => {
...
@@ -75,11 +75,12 @@ const OptimisticL2DisputeGames = () => {
<
PageTitle
title=
"Dispute games"
withTextAd
/>
<
PageTitle
title=
"Dispute games"
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
.
length
}
emptyText=
"There are no dispute games."
emptyText=
"There are no dispute games."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/OptimisticL2OutputRoots.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Text
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
L2_OUTPUT_ROOTS_ITEM
}
from
'
stubs/L2
'
;
import
{
L2_OUTPUT_ROOTS_ITEM
}
from
'
stubs/L2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
OptimisticL2OutputRootsListItem
from
'
ui/outputRoots/optimisticL2/OptimisticL2OutputRootsListItem
'
;
import
OptimisticL2OutputRootsListItem
from
'
ui/outputRoots/optimisticL2/OptimisticL2OutputRootsListItem
'
;
import
OptimisticL2OutputRootsTable
from
'
ui/outputRoots/optimisticL2/OptimisticL2OutputRootsTable
'
;
import
OptimisticL2OutputRootsTable
from
'
ui/outputRoots/optimisticL2/OptimisticL2OutputRootsTable
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -38,7 +38,7 @@ const OptimisticL2OutputRoots = () => {
...
@@ -38,7 +38,7 @@ const OptimisticL2OutputRoots = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
OptimisticL2OutputRootsListItem
<
OptimisticL2OutputRootsListItem
key=
{
item
.
l2_output_index
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
key=
{
item
.
l2_output_index
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
...
@@ -46,10 +46,10 @@ const OptimisticL2OutputRoots = () => {
...
@@ -46,10 +46,10 @@ const OptimisticL2OutputRoots = () => {
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
OptimisticL2OutputRootsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
OptimisticL2OutputRootsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -59,7 +59,7 @@ const OptimisticL2OutputRoots = () => {
...
@@ -59,7 +59,7 @@ const OptimisticL2OutputRoots = () => {
}
}
return
(
return
(
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
&&
!
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
<
Skeleton
loading=
{
countersQuery
.
isPlaceholderData
||
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
L2 output index
L2 output index
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
l2_output_index
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
l2_output_index
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
l2_output_index
}
</
Text
>
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
l2_output_index
}
</
Text
>
...
@@ -75,11 +75,12 @@ const OptimisticL2OutputRoots = () => {
...
@@ -75,11 +75,12 @@ const OptimisticL2OutputRoots = () => {
<
PageTitle
title=
"Output roots"
withTextAd
/>
<
PageTitle
title=
"Output roots"
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
.
length
}
emptyText=
"There are no output roots."
emptyText=
"There are no output roots."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/OptimisticL2TxnBatch.tsx
View file @
4aaf1f1a
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
RoutedTab
}
from
'
ui/shared/
Tabs/types
'
;
import
type
{
TabItemRegular
}
from
'
toolkit/components/Adaptive
Tabs/types
'
;
import
{
useAppContext
}
from
'
lib/contexts/app
'
;
import
{
useAppContext
}
from
'
lib/contexts/app
'
;
import
throwOnAbsentParamError
from
'
lib/errors/throwOnAbsentParamError
'
;
import
throwOnAbsentParamError
from
'
lib/errors/throwOnAbsentParamError
'
;
...
@@ -11,13 +11,13 @@ import getQueryParamString from 'lib/router/getQueryParamString';
...
@@ -11,13 +11,13 @@ import getQueryParamString from 'lib/router/getQueryParamString';
import
{
BLOCK
}
from
'
stubs/block
'
;
import
{
BLOCK
}
from
'
stubs/block
'
;
import
{
TX
}
from
'
stubs/tx
'
;
import
{
TX
}
from
'
stubs/tx
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
RoutedTabs
from
'
toolkit/components/RoutedTabs/RoutedTabs
'
;
import
RoutedTabsSkeleton
from
'
toolkit/components/RoutedTabs/RoutedTabsSkeleton
'
;
import
BlocksContent
from
'
ui/blocks/BlocksContent
'
;
import
BlocksContent
from
'
ui/blocks/BlocksContent
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
Pagination
from
'
ui/shared/pagination/Pagination
'
;
import
Pagination
from
'
ui/shared/pagination/Pagination
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
RoutedTabs
from
'
ui/shared/Tabs/RoutedTabs
'
;
import
TabsSkeleton
from
'
ui/shared/Tabs/TabsSkeleton
'
;
import
OptimisticL2TxnBatchDetails
from
'
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchDetails
'
;
import
OptimisticL2TxnBatchDetails
from
'
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchDetails
'
;
import
useBatchQuery
from
'
ui/txnBatches/optimisticL2/useBatchQuery
'
;
import
useBatchQuery
from
'
ui/txnBatches/optimisticL2/useBatchQuery
'
;
import
TxsWithFrontendSorting
from
'
ui/txs/TxsWithFrontendSorting
'
;
import
TxsWithFrontendSorting
from
'
ui/txs/TxsWithFrontendSorting
'
;
...
@@ -79,7 +79,7 @@ const OptimisticL2TxnBatch = () => {
...
@@ -79,7 +79,7 @@ const OptimisticL2TxnBatch = () => {
const
hasPagination
=
!
isMobile
&&
pagination
?.
isVisible
;
const
hasPagination
=
!
isMobile
&&
pagination
?.
isVisible
;
const
tabs
:
Array
<
RoutedTab
>
=
React
.
useMemo
(()
=>
([
const
tabs
:
Array
<
TabItemRegular
>
=
React
.
useMemo
(()
=>
([
{
id
:
'
index
'
,
title
:
'
Details
'
,
component
:
<
OptimisticL2TxnBatchDetails
query=
{
batchQuery
}
/>
},
{
id
:
'
index
'
,
title
:
'
Details
'
,
component
:
<
OptimisticL2TxnBatchDetails
query=
{
batchQuery
}
/>
},
{
{
id
:
'
txs
'
,
id
:
'
txs
'
,
...
@@ -115,10 +115,10 @@ const OptimisticL2TxnBatch = () => {
...
@@ -115,10 +115,10 @@ const OptimisticL2TxnBatch = () => {
isLoading=
{
batchQuery
.
isPlaceholderData
}
isLoading=
{
batchQuery
.
isPlaceholderData
}
/>
/>
{
batchQuery
.
isPlaceholderData
?
{
batchQuery
.
isPlaceholderData
?
<
TabsSkeleton
tabs=
{
tabs
}
/>
:
(
<
Routed
TabsSkeleton
tabs=
{
tabs
}
/>
:
(
<
RoutedTabs
<
RoutedTabs
tabs=
{
tabs
}
tabs=
{
tabs
}
tabL
istProps=
{
isMobile
?
undefined
:
TAB_LIST_PROPS
}
l
istProps=
{
isMobile
?
undefined
:
TAB_LIST_PROPS
}
rightSlot=
{
hasPagination
&&
pagination
?
<
Pagination
{
...
(
pagination
)
}
/>
:
null
}
rightSlot=
{
hasPagination
&&
pagination
?
<
Pagination
{
...
(
pagination
)
}
/>
:
null
}
stickyEnabled=
{
hasPagination
}
stickyEnabled=
{
hasPagination
}
/>
/>
...
...
ui/pages/OptimisticL2TxnBatches.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Text
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
L2_TXN_BATCHES_ITEM
}
from
'
stubs/L2
'
;
import
{
L2_TXN_BATCHES_ITEM
}
from
'
stubs/L2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -38,7 +38,7 @@ const OptimisticL2TxnBatches = () => {
...
@@ -38,7 +38,7 @@ const OptimisticL2TxnBatches = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
OptimisticL2TxnBatchesListItem
<
OptimisticL2TxnBatchesListItem
key=
{
item
.
internal_id
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
key=
{
item
.
internal_id
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
...
@@ -46,10 +46,10 @@ const OptimisticL2TxnBatches = () => {
...
@@ -46,10 +46,10 @@ const OptimisticL2TxnBatches = () => {
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
OptimisticL2TxnBatchesTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
OptimisticL2TxnBatchesTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -59,7 +59,7 @@ const OptimisticL2TxnBatches = () => {
...
@@ -59,7 +59,7 @@ const OptimisticL2TxnBatches = () => {
}
}
return
(
return
(
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
&&
!
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
<
Skeleton
loading=
{
countersQuery
.
isPlaceholderData
||
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
Txn batch
Txn batch
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
internal_id
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
internal_id
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
internal_id
}
</
Text
>
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
internal_id
}
</
Text
>
...
@@ -75,11 +75,12 @@ const OptimisticL2TxnBatches = () => {
...
@@ -75,11 +75,12 @@ const OptimisticL2TxnBatches = () => {
<
PageTitle
title=
"Txn batches"
withTextAd
/>
<
PageTitle
title=
"Txn batches"
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no txn batches."
emptyText=
"There are no txn batches."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/OptimisticL2Withdrawals.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
}
from
'
@chakra-ui/react
'
;
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
L2_WITHDRAWAL_ITEM
}
from
'
stubs/L2
'
;
import
{
L2_WITHDRAWAL_ITEM
}
from
'
stubs/L2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -39,16 +39,18 @@ const OptimisticL2Withdrawals = () => {
...
@@ -39,16 +39,18 @@ const OptimisticL2Withdrawals = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
OptimisticL2WithdrawalsListItem
<
OptimisticL2WithdrawalsListItem
key=
{
String
(
item
.
msg_nonce_version
)
+
item
.
msg_nonce
+
(
isPlaceholderData
?
index
:
''
)
}
key=
{
String
(
item
.
msg_nonce_version
)
+
item
.
msg_nonce
+
(
isPlaceholderData
?
index
:
''
)
}
item=
{
item
}
item=
{
item
}
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
)))
}
</
Show
>
)))
}
<
Hide
below=
"lg"
ssr=
{
false
}
>
</
Box
>
<
Box
hideBelow=
"lg"
>
<
OptimisticL2WithdrawalsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
OptimisticL2WithdrawalsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -59,7 +61,7 @@ const OptimisticL2Withdrawals = () => {
...
@@ -59,7 +61,7 @@ const OptimisticL2Withdrawals = () => {
return
(
return
(
<
Skeleton
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
}
loading=
{
countersQuery
.
isPlaceholderData
}
display=
"inline-block"
display=
"inline-block"
>
>
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
withdrawals found
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
withdrawals found
...
@@ -74,11 +76,12 @@ const OptimisticL2Withdrawals = () => {
...
@@ -74,11 +76,12 @@ const OptimisticL2Withdrawals = () => {
<
PageTitle
title=
{
`Withdrawals (L2${ nbsp }${ rightLineArrow }${ nbsp }L1)`
}
withTextAd
/>
<
PageTitle
title=
{
`Withdrawals (L2${ nbsp }${ rightLineArrow }${ nbsp }L1)`
}
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no withdrawals."
emptyText=
"There are no withdrawals."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/ScrollL2Deposits.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
}
from
'
@chakra-ui/react
'
;
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
SCROLL_L2_MESSAGE_ITEM
}
from
'
stubs/scrollL2
'
;
import
{
SCROLL_L2_MESSAGE_ITEM
}
from
'
stubs/scrollL2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
ScrollL2DepositsListItem
from
'
ui/deposits/scrollL2/ScrollL2DepositsListItem
'
;
import
ScrollL2DepositsListItem
from
'
ui/deposits/scrollL2/ScrollL2DepositsListItem
'
;
import
ScrollL2DepositsTable
from
'
ui/deposits/scrollL2/ScrollL2DepositsTable
'
;
import
ScrollL2DepositsTable
from
'
ui/deposits/scrollL2/ScrollL2DepositsTable
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -34,7 +34,7 @@ const ScrollL2Deposits = () => {
...
@@ -34,7 +34,7 @@ const ScrollL2Deposits = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
ScrollL2DepositsListItem
<
ScrollL2DepositsListItem
key=
{
String
(
item
.
id
)
+
(
isPlaceholderData
?
index
:
''
)
}
key=
{
String
(
item
.
id
)
+
(
isPlaceholderData
?
index
:
''
)
}
...
@@ -42,10 +42,10 @@ const ScrollL2Deposits = () => {
...
@@ -42,10 +42,10 @@ const ScrollL2Deposits = () => {
item=
{
item
}
item=
{
item
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
ScrollL2DepositsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
ScrollL2DepositsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -56,7 +56,7 @@ const ScrollL2Deposits = () => {
...
@@ -56,7 +56,7 @@ const ScrollL2Deposits = () => {
return
(
return
(
<
Skeleton
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
}
loading=
{
countersQuery
.
isPlaceholderData
}
display=
"inline-block"
display=
"inline-block"
>
>
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
deposits found
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
deposits found
...
@@ -71,11 +71,12 @@ const ScrollL2Deposits = () => {
...
@@ -71,11 +71,12 @@ const ScrollL2Deposits = () => {
<
PageTitle
title=
{
`Deposits (L1${ nbsp }${ rightLineArrow }${ nbsp }L2)`
}
withTextAd
/>
<
PageTitle
title=
{
`Deposits (L1${ nbsp }${ rightLineArrow }${ nbsp }L2)`
}
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no deposits."
emptyText=
"There are no deposits."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/ScrollL2TxnBatch.tsx
View file @
4aaf1f1a
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
RoutedTab
}
from
'
ui/shared/
Tabs/types
'
;
import
type
{
TabItemRegular
}
from
'
toolkit/components/Adaptive
Tabs/types
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
useAppContext
}
from
'
lib/contexts/app
'
;
import
{
useAppContext
}
from
'
lib/contexts/app
'
;
...
@@ -13,13 +13,13 @@ import { BLOCK } from 'stubs/block';
...
@@ -13,13 +13,13 @@ import { BLOCK } from 'stubs/block';
import
{
SCROLL_L2_TXN_BATCH
}
from
'
stubs/scrollL2
'
;
import
{
SCROLL_L2_TXN_BATCH
}
from
'
stubs/scrollL2
'
;
import
{
TX
}
from
'
stubs/tx
'
;
import
{
TX
}
from
'
stubs/tx
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
RoutedTabs
from
'
toolkit/components/RoutedTabs/RoutedTabs
'
;
import
RoutedTabsSkeleton
from
'
toolkit/components/RoutedTabs/RoutedTabsSkeleton
'
;
import
BlocksContent
from
'
ui/blocks/BlocksContent
'
;
import
BlocksContent
from
'
ui/blocks/BlocksContent
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
Pagination
from
'
ui/shared/pagination/Pagination
'
;
import
Pagination
from
'
ui/shared/pagination/Pagination
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
RoutedTabs
from
'
ui/shared/Tabs/RoutedTabs
'
;
import
TabsSkeleton
from
'
ui/shared/Tabs/TabsSkeleton
'
;
import
ScrollL2TxnBatchDetails
from
'
ui/txnBatches/scrollL2/ScrollL2TxnBatchDetails
'
;
import
ScrollL2TxnBatchDetails
from
'
ui/txnBatches/scrollL2/ScrollL2TxnBatchDetails
'
;
import
TxsWithFrontendSorting
from
'
ui/txs/TxsWithFrontendSorting
'
;
import
TxsWithFrontendSorting
from
'
ui/txs/TxsWithFrontendSorting
'
;
...
@@ -86,7 +86,7 @@ const ScrollL2TxnBatch = () => {
...
@@ -86,7 +86,7 @@ const ScrollL2TxnBatch = () => {
const
hasPagination
=
!
isMobile
&&
pagination
?.
isVisible
;
const
hasPagination
=
!
isMobile
&&
pagination
?.
isVisible
;
const
tabs
:
Array
<
RoutedTab
>
=
React
.
useMemo
(()
=>
([
const
tabs
:
Array
<
TabItemRegular
>
=
React
.
useMemo
(()
=>
([
{
id
:
'
index
'
,
title
:
'
Details
'
,
component
:
<
ScrollL2TxnBatchDetails
query=
{
batchQuery
}
/>
},
{
id
:
'
index
'
,
title
:
'
Details
'
,
component
:
<
ScrollL2TxnBatchDetails
query=
{
batchQuery
}
/>
},
{
{
id
:
'
txs
'
,
id
:
'
txs
'
,
...
@@ -121,10 +121,10 @@ const ScrollL2TxnBatch = () => {
...
@@ -121,10 +121,10 @@ const ScrollL2TxnBatch = () => {
backLink=
{
backLink
}
backLink=
{
backLink
}
/>
/>
{
batchQuery
.
isPlaceholderData
?
{
batchQuery
.
isPlaceholderData
?
<
TabsSkeleton
tabs=
{
tabs
}
/>
:
(
<
Routed
TabsSkeleton
tabs=
{
tabs
}
/>
:
(
<
RoutedTabs
<
RoutedTabs
tabs=
{
tabs
}
tabs=
{
tabs
}
tabL
istProps=
{
isMobile
?
undefined
:
TAB_LIST_PROPS
}
l
istProps=
{
isMobile
?
undefined
:
TAB_LIST_PROPS
}
rightSlot=
{
hasPagination
&&
pagination
?
<
Pagination
{
...
(
pagination
)
}
/>
:
null
}
rightSlot=
{
hasPagination
&&
pagination
?
<
Pagination
{
...
(
pagination
)
}
/>
:
null
}
stickyEnabled=
{
hasPagination
}
stickyEnabled=
{
hasPagination
}
/>
/>
...
...
ui/pages/ScrollL2TxnBatches.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Text
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
SCROLL_L2_TXN_BATCH
}
from
'
stubs/scrollL2
'
;
import
{
SCROLL_L2_TXN_BATCH
}
from
'
stubs/scrollL2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -38,7 +38,7 @@ const ScrollL2TxnBatches = () => {
...
@@ -38,7 +38,7 @@ const ScrollL2TxnBatches = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
ScrollL2TxnBatchesListItem
<
ScrollL2TxnBatchesListItem
key=
{
item
.
number
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
key=
{
item
.
number
+
(
isPlaceholderData
?
String
(
index
)
:
''
)
}
...
@@ -46,10 +46,10 @@ const ScrollL2TxnBatches = () => {
...
@@ -46,10 +46,10 @@ const ScrollL2TxnBatches = () => {
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
ScrollL2TxnBatchesTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
ScrollL2TxnBatchesTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -59,7 +59,7 @@ const ScrollL2TxnBatches = () => {
...
@@ -59,7 +59,7 @@ const ScrollL2TxnBatches = () => {
}
}
return
(
return
(
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
&&
!
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
<
Skeleton
loading=
{
countersQuery
.
isPlaceholderData
||
isPlaceholderData
}
display=
"flex"
flexWrap=
"wrap"
>
Txn batch
Txn batch
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
number
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
0
].
number
}
</
Text
>
to
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
number
}
</
Text
>
<
Text
fontWeight=
{
600
}
whiteSpace=
"pre"
>
#
{
data
.
items
[
data
.
items
.
length
-
1
].
number
}
</
Text
>
...
@@ -75,11 +75,12 @@ const ScrollL2TxnBatches = () => {
...
@@ -75,11 +75,12 @@ const ScrollL2TxnBatches = () => {
<
PageTitle
title=
"Txn batches"
withTextAd
/>
<
PageTitle
title=
"Txn batches"
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no txn batches."
emptyText=
"There are no txn batches."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/pages/ScrollL2Withdrawals.tsx
View file @
4aaf1f1a
import
{
Hide
,
Show
}
from
'
@chakra-ui/react
'
;
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
rightLineArrow
,
nbsp
}
from
'
lib/html-entities
'
;
import
{
SCROLL_L2_MESSAGE_ITEM
}
from
'
stubs/scrollL2
'
;
import
{
SCROLL_L2_MESSAGE_ITEM
}
from
'
stubs/scrollL2
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
{
ACTION_BAR_HEIGHT_DESKTOP
}
from
'
ui/shared/ActionBar
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
import
useQueryWithPages
from
'
ui/shared/pagination/useQueryWithPages
'
;
...
@@ -34,7 +34,7 @@ const ScrollL2Withdrawals = () => {
...
@@ -34,7 +34,7 @@ const ScrollL2Withdrawals = () => {
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
(((
item
,
index
)
=>
(
{
data
.
items
.
map
(((
item
,
index
)
=>
(
<
ScrollL2WithdrawalsListItem
<
ScrollL2WithdrawalsListItem
key=
{
String
(
item
.
id
)
+
(
isPlaceholderData
?
index
:
''
)
}
key=
{
String
(
item
.
id
)
+
(
isPlaceholderData
?
index
:
''
)
}
...
@@ -42,10 +42,10 @@ const ScrollL2Withdrawals = () => {
...
@@ -42,10 +42,10 @@ const ScrollL2Withdrawals = () => {
item=
{
item
}
item=
{
item
}
/>
/>
)))
}
)))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
ScrollL2WithdrawalsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
<
ScrollL2WithdrawalsTable
items=
{
data
.
items
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -56,7 +56,7 @@ const ScrollL2Withdrawals = () => {
...
@@ -56,7 +56,7 @@ const ScrollL2Withdrawals = () => {
return
(
return
(
<
Skeleton
<
Skeleton
isLoaded=
{
!
countersQuery
.
isPlaceholderData
}
loading=
{
countersQuery
.
isPlaceholderData
}
display=
"inline-block"
display=
"inline-block"
>
>
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
withdrawals found
A total of
{
countersQuery
.
data
?.
toLocaleString
()
}
withdrawals found
...
@@ -71,11 +71,12 @@ const ScrollL2Withdrawals = () => {
...
@@ -71,11 +71,12 @@ const ScrollL2Withdrawals = () => {
<
PageTitle
title=
{
`Withdrawals (L2${ nbsp }${ rightLineArrow }${ nbsp }L1)`
}
withTextAd
/>
<
PageTitle
title=
{
`Withdrawals (L2${ nbsp }${ rightLineArrow }${ nbsp }L1)`
}
withTextAd
/>
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no withdrawals."
emptyText=
"There are no withdrawals."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
</>
</>
);
);
};
};
...
...
ui/shared/ListItemMobile/ListItemMobileGrid.tsx
View file @
4aaf1f1a
...
@@ -25,8 +25,7 @@ const Container = chakra(({ animation, children, className }: ContainerProps) =>
...
@@ -25,8 +25,7 @@ const Container = chakra(({ animation, children, className }: ContainerProps) =>
borderBottomWidth
:
'
1px
'
,
borderBottomWidth
:
'
1px
'
,
}
}
}
}
className=
{
className
}
className=
{
className
}
fontSize=
"sm"
textStyle=
"sm"
lineHeight=
"20px"
>
>
{
children
}
{
children
}
</
Grid
>
</
Grid
>
...
...
ui/shared/batch/ArbitrumL2TxnBatchDA.tsx
View file @
4aaf1f1a
import
{
Tag
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ArbitrumL2TxnBatchesItem
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2TxnBatchesItem
}
from
'
types/api/arbitrumL2
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Badge
}
from
'
toolkit/chakra/badge
'
;
export
interface
Props
{
export
interface
Props
{
dataContainer
:
ArbitrumL2TxnBatchesItem
[
'
batch_data_container
'
];
dataContainer
:
ArbitrumL2TxnBatchesItem
[
'
batch_data_container
'
];
...
@@ -39,11 +38,9 @@ const ArbitrumL2TxnBatchDA = ({ dataContainer, isLoading }: Props) => {
...
@@ -39,11 +38,9 @@ const ArbitrumL2TxnBatchDA = ({ dataContainer, isLoading }: Props) => {
}
}
return
(
return
(
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Badge
loading=
{
isLoading
}
colorPalette=
{
dataContainer
===
'
in_blob4844
'
?
'
yellow
'
:
'
gray
'
}
>
<
Tag
colorScheme=
{
dataContainer
===
'
in_blob4844
'
?
'
yellow
'
:
'
gray
'
}
>
{
text
}
{
text
}
</
Tag
>
</
Badge
>
</
Skeleton
>
);
);
};
};
...
...
ui/shared/batch/CeleniumLink.tsx
View file @
4aaf1f1a
...
@@ -4,7 +4,7 @@ import React from 'react';
...
@@ -4,7 +4,7 @@ import React from 'react';
// eslint-disable-next-line no-restricted-imports
// eslint-disable-next-line no-restricted-imports
import
celeniumIcon
from
'
icons/brands/celenium.svg
'
;
import
celeniumIcon
from
'
icons/brands/celenium.svg
'
;
import
hexToBase64
from
'
lib/hexToBase64
'
;
import
hexToBase64
from
'
lib/hexToBase64
'
;
import
LinkExternal
from
'
ui/shared/links/LinkExternal
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
interface
Props
{
interface
Props
{
commitment
:
string
;
commitment
:
string
;
...
@@ -26,7 +26,7 @@ const CeleniumLink = (props: Props) => {
...
@@ -26,7 +26,7 @@ const CeleniumLink = (props: Props) => {
return
(
return
(
<
Flex
alignItems=
"center"
columnGap=
{
2
}
>
<
Flex
alignItems=
"center"
columnGap=
{
2
}
>
<
Icon
as=
{
celeniumIcon
}
boxSize=
{
5
}
/>
<
Icon
as=
{
celeniumIcon
}
boxSize=
{
5
}
/>
<
Link
External
href=
{
getCeleniumUrl
(
props
)
}
>
Blob page
</
LinkExternal
>
<
Link
external
href=
{
getCeleniumUrl
(
props
)
}
>
Blob page
</
Link
>
</
Flex
>
</
Flex
>
);
);
};
};
...
...
ui/shared/batch/OptimisticL2TxnBatchDA.tsx
View file @
4aaf1f1a
...
@@ -24,7 +24,7 @@ const OptimisticL2TxnBatchDA = ({ container, isLoading }: Props) => {
...
@@ -24,7 +24,7 @@ const OptimisticL2TxnBatchDA = ({ container, isLoading }: Props) => {
})();
})();
return
(
return
(
<
Badge
color
Schem
e=
"yellow"
loading=
{
isLoading
}
>
<
Badge
color
Palett
e=
"yellow"
loading=
{
isLoading
}
>
{
text
}
{
text
}
</
Badge
>
</
Badge
>
);
);
...
...
ui/shared/batch/ScrollL2TxnBatchDA.tsx
View file @
4aaf1f1a
...
@@ -3,7 +3,7 @@ import React from 'react';
...
@@ -3,7 +3,7 @@ import React from 'react';
import
type
{
ScrollL2TxnBatch
}
from
'
types/api/scrollL2
'
;
import
type
{
ScrollL2TxnBatch
}
from
'
types/api/scrollL2
'
;
import
type
{
ExcludeUndefined
}
from
'
types/utils
'
;
import
type
{
ExcludeUndefined
}
from
'
types/utils
'
;
import
Tag
from
'
ui/shared/chakra/Tag
'
;
import
{
Badge
}
from
'
toolkit/chakra/badge
'
;
export
interface
Props
{
export
interface
Props
{
container
:
ExcludeUndefined
<
ScrollL2TxnBatch
[
'
data_availability
'
][
'
batch_data_container
'
]
>
;
container
:
ExcludeUndefined
<
ScrollL2TxnBatch
[
'
data_availability
'
][
'
batch_data_container
'
]
>
;
...
@@ -22,9 +22,9 @@ const ScrollL2TxnBatchDA = ({ container, isLoading }: Props) => {
...
@@ -22,9 +22,9 @@ const ScrollL2TxnBatchDA = ({ container, isLoading }: Props) => {
})();
})();
return
(
return
(
<
Tag
colorScheme=
"yellow"
isL
oading=
{
isLoading
}
>
<
Badge
colorPalette=
"yellow"
l
oading=
{
isLoading
}
>
{
text
}
{
text
}
</
Tag
>
</
Badge
>
);
);
};
};
...
...
ui/shared/forms/components/FieldError.tsx
View file @
4aaf1f1a
...
@@ -7,7 +7,7 @@ interface Props {
...
@@ -7,7 +7,7 @@ interface Props {
}
}
const
FieldError
=
({
message
,
className
}:
Props
)
=>
{
const
FieldError
=
({
message
,
className
}:
Props
)
=>
{
return
<
Box
className=
{
className
}
color=
"error"
fontSiz
e=
"sm"
mt=
{
2
}
wordBreak=
"break-word"
>
{
message
}
</
Box
>;
return
<
Box
className=
{
className
}
color=
"error"
textStyl
e=
"sm"
mt=
{
2
}
wordBreak=
"break-word"
>
{
message
}
</
Box
>;
};
};
export
default
chakra
(
FieldError
);
export
default
chakra
(
FieldError
);
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx
View file @
4aaf1f1a
import
{
Grid
,
GridItem
,
Link
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
}
from
'
@chakra-ui/react
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
scroller
,
Element
}
from
'
react-scroll
'
;
import
type
{
ArbitrumL2TxnBatch
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2TxnBatch
}
from
'
types/api/arbitrumL2
'
;
...
@@ -10,9 +9,11 @@ import { route } from 'nextjs-routes';
...
@@ -10,9 +9,11 @@ import { route } from 'nextjs-routes';
import
type
{
ResourceError
}
from
'
lib/api/resources
'
;
import
type
{
ResourceError
}
from
'
lib/api/resources
'
;
import
throwOnResourceLoadError
from
'
lib/errors/throwOnResourceLoadError
'
;
import
throwOnResourceLoadError
from
'
lib/errors/throwOnResourceLoadError
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
CutLinkDetails
from
'
toolkit/components/CutLink/CutLinkDetails
'
;
import
isCustomAppError
from
'
ui/shared/AppError/isCustomAppError
'
;
import
isCustomAppError
from
'
ui/shared/AppError/isCustomAppError
'
;
import
ArbitrumL2TxnBatchDA
from
'
ui/shared/batch/ArbitrumL2TxnBatchDA
'
;
import
ArbitrumL2TxnBatchDA
from
'
ui/shared/batch/ArbitrumL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
*
as
DetailedInfo
from
'
ui/shared/DetailedInfo/DetailedInfo
'
;
import
*
as
DetailedInfo
from
'
ui/shared/DetailedInfo/DetailedInfo
'
;
...
@@ -20,26 +21,17 @@ import DetailedInfoTimestamp from 'ui/shared/DetailedInfo/DetailedInfoTimestamp'
...
@@ -20,26 +21,17 @@ import DetailedInfoTimestamp from 'ui/shared/DetailedInfo/DetailedInfoTimestamp'
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
PrevNext
from
'
ui/shared/PrevNext
'
;
import
PrevNext
from
'
ui/shared/PrevNext
'
;
import
ArbitrumL2TxnBatchDetailsAnyTrustDA
from
'
./ArbitrumL2TxnBatchDetailsAnyTrustDA
'
;
import
ArbitrumL2TxnBatchDetailsAnyTrustDA
from
'
./ArbitrumL2TxnBatchDetailsAnyTrustDA
'
;
import
ArbitrumL2TxnBatchDetailsCelestiaDA
from
'
./ArbitrumL2TxnBatchDetailsCelestiaDA
'
;
import
ArbitrumL2TxnBatchDetailsCelestiaDA
from
'
./ArbitrumL2TxnBatchDetailsCelestiaDA
'
;
interface
Props
{
interface
Props
{
query
:
UseQueryResult
<
ArbitrumL2TxnBatch
,
ResourceError
>
;
query
:
UseQueryResult
<
ArbitrumL2TxnBatch
,
ResourceError
>
;
}
}
const
ArbitrumL2TxnBatchDetails
=
({
query
}:
Props
)
=>
{
const
ArbitrumL2TxnBatchDetails
=
({
query
}:
Props
)
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
[
isExpanded
,
setIsExpanded
]
=
React
.
useState
(
false
);
const
handleCutClick
=
React
.
useCallback
(()
=>
{
setIsExpanded
((
flag
)
=>
!
flag
);
scroller
.
scrollTo
(
'
BatchDetails__cutLink
'
,
{
duration
:
500
,
smooth
:
true
,
});
},
[]);
const
{
data
,
isPlaceholderData
,
isError
,
error
}
=
query
;
const
{
data
,
isPlaceholderData
,
isError
,
error
}
=
query
;
...
@@ -82,7 +74,7 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -82,7 +74,7 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
Txn batch number
Txn batch number
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Skeleton
loading=
{
isPlaceholderData
}
>
{
data
.
number
}
{
data
.
number
}
</
Skeleton
>
</
Skeleton
>
<
PrevNext
<
PrevNext
...
@@ -115,11 +107,9 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -115,11 +107,9 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
Transactions
Transactions
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Link
loading=
{
isPlaceholderData
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
>
{
data
.
transactions_count
.
toLocaleString
()
}
transaction
{
data
.
transactions_count
===
1
?
''
:
'
s
'
}
{
data
.
transactions_count
.
toLocaleString
()
}
transaction
{
data
.
transactions_count
===
1
?
''
:
'
s
'
}
</
LinkInternal
>
</
Link
>
</
Skeleton
>
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemLabel
<
DetailedInfo
.
ItemLabel
...
@@ -129,11 +119,9 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -129,11 +119,9 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
Blocks
Blocks
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Link
loading=
{
isPlaceholderData
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
number
.
toString
(),
tab
:
'
blocks
'
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
number
.
toString
(),
tab
:
'
blocks
'
}
})
}
>
{
blocksCount
.
toLocaleString
()
}
block
{
blocksCount
===
1
?
''
:
'
s
'
}
{
blocksCount
.
toLocaleString
()
}
block
{
blocksCount
===
1
?
''
:
'
s
'
}
</
LinkInternal
>
</
Link
>
</
Skeleton
>
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemLabel
<
DetailedInfo
.
ItemLabel
...
@@ -183,7 +171,7 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -183,7 +171,7 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
Before acc
Before acc
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
flexWrap=
"nowrap"
>
<
DetailedInfo
.
ItemValue
flexWrap=
"nowrap"
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
overflow=
"hidden"
>
<
Skeleton
loading=
{
isPlaceholderData
}
overflow=
"hidden"
>
<
HashStringShortenDynamic
hash=
{
data
.
before_acc
}
/>
<
HashStringShortenDynamic
hash=
{
data
.
before_acc
}
/>
</
Skeleton
>
</
Skeleton
>
<
CopyToClipboard
text=
{
data
.
before_acc
}
isLoading=
{
isPlaceholderData
}
/>
<
CopyToClipboard
text=
{
data
.
before_acc
}
isLoading=
{
isPlaceholderData
}
/>
...
@@ -196,33 +184,19 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -196,33 +184,19 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
After acc
After acc
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
flexWrap=
"nowrap"
>
<
DetailedInfo
.
ItemValue
flexWrap=
"nowrap"
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
overflow=
"hidden"
>
<
Skeleton
loading=
{
isPlaceholderData
}
overflow=
"hidden"
>
<
HashStringShortenDynamic
hash=
{
data
.
after_acc
}
/>
<
HashStringShortenDynamic
hash=
{
data
.
after_acc
}
/>
</
Skeleton
>
</
Skeleton
>
<
CopyToClipboard
text=
{
data
.
after_acc
}
isLoading=
{
isPlaceholderData
}
/>
<
CopyToClipboard
text=
{
data
.
after_acc
}
isLoading=
{
isPlaceholderData
}
/>
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
{
(
data
.
data_availability
.
batch_data_container
===
'
in_anytrust
'
||
data
.
data_availability
.
batch_data_container
===
'
in_celestia
'
)
&&
(
{
(
data
.
data_availability
.
batch_data_container
===
'
in_anytrust
'
||
data
.
data_availability
.
batch_data_container
===
'
in_celestia
'
)
&&
(
<>
<
CutLinkDetails
{
/* CUT */
}
loading=
{
isPlaceholderData
}
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
>
mt=
{
6
}
<
Element
name=
"BatchDetails__cutLink"
>
gridColumn=
{
{
base
:
undefined
,
lg
:
'
1 / 3
'
}
}
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
mt=
{
6
}
display=
"inline-block"
>
text=
{
[
'
Show data availability info
'
,
'
Hide data availability info
'
]
}
<
Link
fontSize=
"sm"
textDecorationLine=
"underline"
textDecorationStyle=
"dashed"
onClick=
{
handleCutClick
}
>
>
{
isExpanded
?
'
Hide data availability info
'
:
'
Show data availability info
'
}
</
Link
>
</
Skeleton
>
</
Element
>
</
GridItem
>
{
/* ADDITIONAL INFO */
}
{
isExpanded
&&
!
isPlaceholderData
&&
(
<>
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
1
,
lg
:
4
}
}
/>
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
1
,
lg
:
4
}
}
/>
{
data
.
data_availability
.
batch_data_container
===
'
in_anytrust
'
&&
(
{
data
.
data_availability
.
batch_data_container
===
'
in_anytrust
'
&&
(
...
@@ -231,9 +205,7 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -231,9 +205,7 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
{
data
.
data_availability
.
batch_data_container
===
'
in_celestia
'
&&
(
{
data
.
data_availability
.
batch_data_container
===
'
in_celestia
'
&&
(
<
ArbitrumL2TxnBatchDetailsCelestiaDA
data=
{
data
.
data_availability
}
/>
<
ArbitrumL2TxnBatchDetailsCelestiaDA
data=
{
data
.
data_availability
}
/>
)
}
)
}
</>
</
CutLinkDetails
>
)
}
</>
)
}
)
}
</
Grid
>
</
Grid
>
);
);
...
...
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetailsAnyTrustDA.tsx
View file @
4aaf1f1a
import
{
Grid
,
Text
,
Flex
,
Box
,
useColorModeValue
,
Show
,
Hide
,
VStack
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
Text
,
Flex
,
Box
,
VStack
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ArbitrumL2TxnBatchDAAnytrust
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2TxnBatchDAAnytrust
}
from
'
types/api/arbitrumL2
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
*
as
Detail
sInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
*
as
Detail
edInfo
from
'
ui/shared/DetailedInfo/DetailedInfo
'
;
import
DetailsTimestamp
from
'
ui/shared/Detail
s
Timestamp
'
;
import
DetailsTimestamp
from
'
ui/shared/Detail
edInfo/DetailedInfo
Timestamp
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
TextSeparator
from
'
ui/shared/TextSeparator
'
;
import
TextSeparator
from
'
ui/shared/TextSeparator
'
;
...
@@ -16,28 +16,26 @@ type Props = {
...
@@ -16,28 +16,26 @@ type Props = {
};
};
const
ArbitrumL2TxnBatchDetailsAnyTrustDA
=
({
data
}:
Props
)
=>
{
const
ArbitrumL2TxnBatchDetailsAnyTrustDA
=
({
data
}:
Props
)
=>
{
const
signersBg
=
useColorModeValue
(
'
blackAlpha.50
'
,
'
whiteAlpha.50
'
);
return
(
return
(
<>
<>
<
Detail
sInfoItem
.
Label
<
Detail
edInfo
.
Item
Label
hint=
"Aggregated BLS signature of AnyTrust committee members"
hint=
"Aggregated BLS signature of AnyTrust committee members"
>
>
Signature
Signature
</
Detail
sInfoItem
.
Label
><
DetailsInfoItem
.
Value
wordBreak=
"break-all"
whiteSpace=
"break-spaces"
>
</
Detail
edInfo
.
ItemLabel
><
DetailedInfo
.
Item
Value
wordBreak=
"break-all"
whiteSpace=
"break-spaces"
>
{
data
.
bls_signature
}
{
data
.
bls_signature
}
</
Detail
sInfoItem
.
Value
><
DetailsInfoItem
.
Label
</
Detail
edInfo
.
ItemValue
><
DetailedInfo
.
Item
Label
hint=
"The hash of the data blob stored by the AnyTrust committee"
hint=
"The hash of the data blob stored by the AnyTrust committee"
>
>
Data hash
Data hash
</
Detail
sInfoItem
.
Label
><
DetailsInfoItem
.
Value
>
</
Detail
edInfo
.
ItemLabel
><
DetailedInfo
.
Item
Value
>
{
data
.
data_hash
}
{
data
.
data_hash
}
<
CopyToClipboard
text=
{
data
.
data_hash
}
ml=
{
2
}
/>
<
CopyToClipboard
text=
{
data
.
data_hash
}
ml=
{
2
}
/>
</
Detail
sInfoItem
.
Value
><
DetailsInfoItem
.
Label
</
Detail
edInfo
.
ItemValue
><
DetailedInfo
.
Item
Label
hint=
"Expiration timeout for the data blob"
hint=
"Expiration timeout for the data blob"
>
>
Timeout
Timeout
</
Detail
sInfoItem
.
Label
><
DetailsInfoItem
.
Value
>
</
Detail
edInfo
.
ItemLabel
><
DetailedInfo
.
Item
Value
>
{
dayjs
(
data
.
timeout
)
<
dayjs
()
?
{
dayjs
(
data
.
timeout
)
<
dayjs
()
?
<
DetailsTimestamp
timestamp=
{
data
.
timeout
}
/>
:
<
DetailsTimestamp
timestamp=
{
data
.
timeout
}
/>
:
(
(
...
@@ -47,18 +45,18 @@ const ArbitrumL2TxnBatchDetailsAnyTrustDA = ({ data }: Props) => {
...
@@ -47,18 +45,18 @@ const ArbitrumL2TxnBatchDetailsAnyTrustDA = ({ data }: Props) => {
<
Text
color=
"red.500"
>
{
dayjs
(
data
.
timeout
).
diff
(
dayjs
(),
'
day
'
)
}
days left
</
Text
>
<
Text
color=
"red.500"
>
{
dayjs
(
data
.
timeout
).
diff
(
dayjs
(),
'
day
'
)
}
days left
</
Text
>
</>
</>
)
}
)
}
</
Detail
sInfoItem
.
Value
>
</
Detail
edInfo
.
Item
Value
>
<
Detail
sInfoItem
.
Label
<
Detail
edInfo
.
Item
Label
hint=
"Members of AnyTrust committee"
hint=
"Members of AnyTrust committee"
>
>
Signers
Signers
</
DetailsInfoItem
.
Label
>
</
DetailedInfo
.
ItemLabel
>
<
DetailsInfoItem
.
Value
overflowX=
"scroll"
fontSize=
"sm"
>
<
DetailedInfo
.
ItemValue
overflowX=
"scroll"
fontSize=
"sm"
>
<
Show
above=
"lg"
ssr=
{
false
}
>
<
Grid
<
Grid
hideBelow=
"lg"
templateColumns=
"1fr auto auto"
templateColumns=
"1fr auto auto"
gap=
{
5
}
gap=
{
5
}
backgroundColor=
{
signersBg
}
backgroundColor=
{
{
_light
:
'
blackAlpha.50
'
,
_dark
:
'
whiteAlpha.50
'
}
}
padding=
{
4
}
padding=
{
4
}
borderRadius=
"md"
borderRadius=
"md"
minW=
"600px"
minW=
"600px"
...
@@ -84,10 +82,8 @@ const ArbitrumL2TxnBatchDetailsAnyTrustDA = ({ data }: Props) => {
...
@@ -84,10 +82,8 @@ const ArbitrumL2TxnBatchDetailsAnyTrustDA = ({ data }: Props) => {
</>
</>
))
}
))
}
</
Grid
>
</
Grid
>
</
Show
>
<
Hide
above=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
backgroundColor=
{
{
_light
:
'
blackAlpha.50
'
,
_dark
:
'
whiteAlpha.50
'
}
}
borderRadius=
"md"
>
<
Box
backgroundColor=
{
signersBg
}
borderRadius=
"md"
>
{
data
.
signers
.
map
(
signer
=>
(
{
data
.
signers
.
map
(
signer
=>
(
<
VStack
padding=
{
4
}
key=
{
signer
.
key
}
gap=
{
2
}
>
<
VStack
padding=
{
4
}
key=
{
signer
.
key
}
gap=
{
2
}
>
<
Flex
w=
"100%"
justifyContent=
"space-between"
>
<
Flex
w=
"100%"
justifyContent=
"space-between"
>
...
@@ -113,8 +109,7 @@ const ArbitrumL2TxnBatchDetailsAnyTrustDA = ({ data }: Props) => {
...
@@ -113,8 +109,7 @@ const ArbitrumL2TxnBatchDetailsAnyTrustDA = ({ data }: Props) => {
</
VStack
>
</
VStack
>
))
}
))
}
</
Box
>
</
Box
>
</
Hide
>
</
DetailedInfo
.
ItemValue
>
</
DetailsInfoItem
.
Value
>
</>
</>
);
);
};
};
...
...
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetailsCelestiaDA.tsx
View file @
4aaf1f1a
...
@@ -6,7 +6,7 @@ import type { ArbitrumL2TxnBatchDACelestia } from 'types/api/arbitrumL2';
...
@@ -6,7 +6,7 @@ import type { ArbitrumL2TxnBatchDACelestia } from 'types/api/arbitrumL2';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
CeleniumLink
from
'
ui/shared/batch/CeleniumLink
'
;
import
CeleniumLink
from
'
ui/shared/batch/CeleniumLink
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
*
as
Detail
sInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
*
as
Detail
edInfo
from
'
ui/shared/DetailedInfo/DetailedInfo
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
const
feature
=
config
.
features
.
rollup
;
const
feature
=
config
.
features
.
rollup
;
...
@@ -18,21 +18,21 @@ interface Props {
...
@@ -18,21 +18,21 @@ interface Props {
const
ArbitrumL2TxnBatchDetailsCelestiaDA
=
({
data
}:
Props
)
=>
{
const
ArbitrumL2TxnBatchDetailsCelestiaDA
=
({
data
}:
Props
)
=>
{
return
(
return
(
<>
<>
<
Detail
sInfoItem
.
Label
<
Detail
edInfo
.
Item
Label
hint=
"The block number in Celestia where the Data Availability blob was published"
hint=
"The block number in Celestia where the Data Availability blob was published"
>
>
Height
Height
</
Detail
sInfoItem
.
Label
>
</
Detail
edInfo
.
Item
Label
>
<
Detail
sInfoItem
.
Value
wordBreak=
"break-all"
whiteSpace=
"break-spaces"
>
<
Detail
edInfo
.
Item
Value
wordBreak=
"break-all"
whiteSpace=
"break-spaces"
>
{
data
.
height
}
{
data
.
height
}
</
Detail
sInfoItem
.
Value
>
</
Detail
edInfo
.
Item
Value
>
<
Detail
sInfoItem
.
Label
<
Detail
edInfo
.
Item
Label
hint=
"The Data Availability blob’s unique cryptographic proof"
hint=
"The Data Availability blob’s unique cryptographic proof"
>
>
Commitment
Commitment
</
Detail
sInfoItem
.
Label
>
</
Detail
edInfo
.
Item
Label
>
<
Detail
sInfoItem
.
Value
flexWrap=
"nowrap"
>
<
Detail
edInfo
.
Item
Value
flexWrap=
"nowrap"
>
<
Flex
overflow=
"hidden"
minW=
"0"
>
<
Flex
overflow=
"hidden"
minW=
"0"
>
<
HashStringShortenDynamic
hash=
{
data
.
transaction_commitment
}
/>
<
HashStringShortenDynamic
hash=
{
data
.
transaction_commitment
}
/>
</
Flex
>
</
Flex
>
...
@@ -44,7 +44,7 @@ const ArbitrumL2TxnBatchDetailsCelestiaDA = ({ data }: Props) => {
...
@@ -44,7 +44,7 @@ const ArbitrumL2TxnBatchDetailsCelestiaDA = ({ data }: Props) => {
height=
{
data
.
height
}
height=
{
data
.
height
}
/>
/>
)
}
)
}
</
Detail
sInfoItem
.
Value
>
</
Detail
edInfo
.
Item
Value
>
</>
</>
);
);
};
};
...
...
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesListItem.tsx
View file @
4aaf1f1a
...
@@ -5,12 +5,12 @@ import type { ArbitrumL2TxnBatchesItem } from 'types/api/arbitrumL2';
...
@@ -5,12 +5,12 @@ import type { ArbitrumL2TxnBatchesItem } from 'types/api/arbitrumL2';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
ArbitrumL2TxnBatchDA
from
'
ui/shared/batch/ArbitrumL2TxnBatchDA
'
;
import
ArbitrumL2TxnBatchDA
from
'
ui/shared/batch/ArbitrumL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ArbitrumL2TxnBatchStatus
from
'
ui/shared/statusTag/ArbitrumL2TxnBatchStatus
'
;
import
ArbitrumL2TxnBatchStatus
from
'
ui/shared/statusTag/ArbitrumL2TxnBatchStatus
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
...
@@ -32,8 +32,6 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -32,8 +32,6 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
BatchEntityL2
<
BatchEntityL2
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
number=
{
item
.
number
}
number=
{
item
.
number
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -48,8 +46,6 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -48,8 +46,6 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
commitment_transaction
.
block_number
}
number=
{
item
.
commitment_transaction
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -57,7 +53,7 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -57,7 +53,7 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<>
<>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Block count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Block count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
blocks_count
.
toLocaleString
()
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
blocks_count
.
toLocaleString
()
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
</>
</>
)
}
)
}
...
@@ -67,8 +63,6 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -67,8 +63,6 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
TxEntityL1
<
TxEntityL1
hash=
{
item
.
commitment_transaction
.
hash
}
hash=
{
item
.
commitment_transaction
.
hash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -85,15 +79,14 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -85,15 +79,14 @@ const ArbitrumL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Txn count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Txn count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Link
Internal
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
isL
oading=
{
isLoading
}
l
oading=
{
isLoading
}
fontWeight=
{
600
}
fontWeight=
{
600
}
minW=
"40px"
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
>
{
item
.
transactions_count
.
toLocaleString
()
}
{
item
.
transactions_count
.
toLocaleString
()
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Data container
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Data container
</
ListItemMobileGrid
.
Label
>
...
...
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ArbitrumL2TxnBatchesItem
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2TxnBatchesItem
}
from
'
types/api/arbitrumL2
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
ArbitrumL2TxnBatchesTableItem
from
'
./ArbitrumL2TxnBatchesTableItem
'
;
import
ArbitrumL2TxnBatchesTableItem
from
'
./ArbitrumL2TxnBatchesTableItem
'
;
...
@@ -15,19 +14,19 @@ type Props = {
...
@@ -15,19 +14,19 @@ type Props = {
const
ArbitrumL2TxnBatchesTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
ArbitrumL2TxnBatchesTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
minW=
"1000px"
style=
{
{
tableLayout
:
'
auto
'
}
}
>
<
Table
Root
tableLayout=
"auto"
minW=
"1000px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
>
Batch #
</
Th
>
<
T
ableColumnHeader
>
Batch #
</
TableColumnHeader
>
<
T
h
>
L1 status
</
Th
>
<
T
ableColumnHeader
>
L1 status
</
TableColumnHeader
>
<
T
h
>
L1 block
</
Th
>
<
T
ableColumnHeader
>
L1 block
</
TableColumnHeader
>
<
T
h
>
Block count
</
Th
>
<
T
ableColumnHeader
>
Block count
</
TableColumnHeader
>
<
T
h
>
L1 transaction
</
Th
>
<
T
ableColumnHeader
>
L1 transaction
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
>
Txn count
</
Th
>
<
T
ableColumnHeader
>
Txn count
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
ArbitrumL2TxnBatchesTableItem
<
ArbitrumL2TxnBatchesTableItem
key=
{
item
.
number
+
(
isLoading
?
String
(
index
)
:
''
)
}
key=
{
item
.
number
+
(
isLoading
?
String
(
index
)
:
''
)
}
...
@@ -35,8 +34,8 @@ const ArbitrumL2TxnBatchesTable = ({ items, top, isLoading }: Props) => {
...
@@ -35,8 +34,8 @@ const ArbitrumL2TxnBatchesTable = ({ items, top, isLoading }: Props) => {
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesTableItem.tsx
View file @
4aaf1f1a
import
{
Td
,
Tr
,
HStack
}
from
'
@chakra-ui/react
'
;
import
{
HStack
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ArbitrumL2TxnBatchesItem
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2TxnBatchesItem
}
from
'
types/api/arbitrumL2
'
;
...
@@ -6,12 +6,13 @@ import type { ArbitrumL2TxnBatchesItem } from 'types/api/arbitrumL2';
...
@@ -6,12 +6,13 @@ import type { ArbitrumL2TxnBatchesItem } from 'types/api/arbitrumL2';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
ArbitrumL2TxnBatchDA
from
'
ui/shared/batch/ArbitrumL2TxnBatchDA
'
;
import
ArbitrumL2TxnBatchDA
from
'
ui/shared/batch/ArbitrumL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
ArbitrumL2TxnBatchStatus
from
'
ui/shared/statusTag/ArbitrumL2TxnBatchStatus
'
;
import
ArbitrumL2TxnBatchStatus
from
'
ui/shared/statusTag/ArbitrumL2TxnBatchStatus
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
...
@@ -25,62 +26,55 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => {
...
@@ -25,62 +26,55 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => {
}
}
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BatchEntityL2
<
BatchEntityL2
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
number=
{
item
.
number
}
number=
{
item
.
number
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
HStack
gap=
{
1
}
>
<
HStack
gap=
{
1
}
>
<
ArbitrumL2TxnBatchStatus
status=
{
item
.
commitment_transaction
.
status
}
isLoading=
{
isLoading
}
/>
<
ArbitrumL2TxnBatchStatus
status=
{
item
.
commitment_transaction
.
status
}
isLoading=
{
isLoading
}
/>
<
ArbitrumL2TxnBatchDA
dataContainer=
{
item
.
batch_data_container
}
isLoading=
{
isLoading
}
/>
<
ArbitrumL2TxnBatchDA
dataContainer=
{
item
.
batch_data_container
}
isLoading=
{
isLoading
}
/>
</
HStack
>
</
HStack
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
commitment_transaction
.
block_number
}
number=
{
item
.
commitment_transaction
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
blocks_count
?
item
.
blocks_count
.
toLocaleString
()
:
'
N/A
'
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
blocks_count
?
item
.
blocks_count
.
toLocaleString
()
:
'
N/A
'
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
pr=
{
12
}
verticalAlign=
"middle"
>
<
T
ableCell
pr=
{
12
}
verticalAlign=
"middle"
>
<
TxEntityL1
<
TxEntityL1
hash=
{
item
.
commitment_transaction
.
hash
}
hash=
{
item
.
commitment_transaction
.
hash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
commitment_transaction
.
timestamp
}
timestamp=
{
item
.
commitment_transaction
.
timestamp
}
fallbackText=
"Undefined"
fallbackText=
"Undefined"
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
color=
"text_secondary"
color=
"text_secondary"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Link
Internal
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
isLoading=
{
isLoading
}
loading=
{
isLoading
}
minW=
"40px"
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
>
{
item
.
transactions_count
.
toLocaleString
()
}
{
item
.
transactions_count
.
toLocaleString
()
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
TableCell
>
</
Td
>
</
TableRow
>
</
Tr
>
);
);
};
};
...
...
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobWrapper.tsx
View file @
4aaf1f1a
import
{
chakra
,
Grid
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
chakra
,
Grid
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
interface
Props
{
interface
Props
{
...
@@ -8,20 +8,18 @@ interface Props {
...
@@ -8,20 +8,18 @@ interface Props {
}
}
const
OptimisticL2TxnBatchBlobWrapper
=
({
children
,
className
,
isLoading
}:
Props
)
=>
{
const
OptimisticL2TxnBatchBlobWrapper
=
({
children
,
className
,
isLoading
}:
Props
)
=>
{
const
bgColor
=
useColorModeValue
(
'
blackAlpha.50
'
,
'
whiteAlpha.100
'
);
return
(
return
(
<
Grid
<
Grid
className=
{
className
}
className=
{
className
}
columnGap=
{
3
}
columnGap=
{
3
}
rowGap=
"10px"
rowGap=
"10px"
p=
{
4
}
p=
{
4
}
bgColor=
{
bgColor
}
bgColor=
{
{
_light
:
'
blackAlpha.50
'
,
_dark
:
'
whiteAlpha.100
'
}
}
gridTemplateColumns=
"auto 1fr"
gridTemplateColumns=
"auto 1fr"
borderRadius=
"base"
borderRadius=
"base"
w=
"100%"
w=
"100%"
h=
{
isLoading
?
'
140px
'
:
undefined
}
h=
{
isLoading
?
'
140px
'
:
undefined
}
fontSize=
"sm"
textStyle=
"sm"
lineHeight=
{
5
}
>
>
{
isLoading
?
null
:
children
}
{
isLoading
?
null
:
children
}
</
Grid
>
</
Grid
>
...
...
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchDetails.tsx
View file @
4aaf1f1a
...
@@ -9,13 +9,13 @@ import { route } from 'nextjs-routes';
...
@@ -9,13 +9,13 @@ import { route } from 'nextjs-routes';
import
type
{
ResourceError
}
from
'
lib/api/resources
'
;
import
type
{
ResourceError
}
from
'
lib/api/resources
'
;
import
throwOnResourceLoadError
from
'
lib/errors/throwOnResourceLoadError
'
;
import
throwOnResourceLoadError
from
'
lib/errors/throwOnResourceLoadError
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
isCustomAppError
from
'
ui/shared/AppError/isCustomAppError
'
;
import
isCustomAppError
from
'
ui/shared/AppError/isCustomAppError
'
;
import
OptimisticL2TxnBatchDA
from
'
ui/shared/batch/OptimisticL2TxnBatchDA
'
;
import
OptimisticL2TxnBatchDA
from
'
ui/shared/batch/OptimisticL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
*
as
DetailedInfo
from
'
ui/shared/DetailedInfo/DetailedInfo
'
;
import
*
as
DetailedInfo
from
'
ui/shared/DetailedInfo/DetailedInfo
'
;
import
DetailedInfoTimestamp
from
'
ui/shared/DetailedInfo/DetailedInfoTimestamp
'
;
import
DetailedInfoTimestamp
from
'
ui/shared/DetailedInfo/DetailedInfoTimestamp
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
PrevNext
from
'
ui/shared/PrevNext
'
;
import
PrevNext
from
'
ui/shared/PrevNext
'
;
import
OptimisticL2TxnBatchBlobCallData
from
'
./OptimisticL2TxnBatchBlobCallData
'
;
import
OptimisticL2TxnBatchBlobCallData
from
'
./OptimisticL2TxnBatchBlobCallData
'
;
...
@@ -70,7 +70,7 @@ const OptimisticL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -70,7 +70,7 @@ const OptimisticL2TxnBatchDetails = ({ query }: Props) => {
Batch ID
Batch ID
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Skeleton
loading=
{
isPlaceholderData
}
>
{
data
.
internal_id
}
{
data
.
internal_id
}
</
Skeleton
>
</
Skeleton
>
<
PrevNext
<
PrevNext
...
@@ -103,10 +103,10 @@ const OptimisticL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -103,10 +103,10 @@ const OptimisticL2TxnBatchDetails = ({ query }: Props) => {
Transactions
Transactions
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Skeleton
loading=
{
isPlaceholderData
}
>
<
Link
Internal
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
internal_id
.
toString
(),
tab
:
'
txs
'
}
})
}
>
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
internal_id
.
toString
(),
tab
:
'
txs
'
}
})
}
>
{
data
.
transaction_count
.
toLocaleString
()
}
transaction
{
data
.
transaction_count
===
1
?
''
:
'
s
'
}
{
data
.
transaction_count
.
toLocaleString
()
}
transaction
{
data
.
transaction_count
===
1
?
''
:
'
s
'
}
</
Link
Internal
>
</
Link
>
{
'
'
}
in this batch
{
'
'
}
in this batch
</
Skeleton
>
</
Skeleton
>
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
...
@@ -118,10 +118,10 @@ const OptimisticL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -118,10 +118,10 @@ const OptimisticL2TxnBatchDetails = ({ query }: Props) => {
Blocks
Blocks
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Skeleton
loading=
{
isPlaceholderData
}
>
<
Link
Internal
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
internal_id
.
toString
(),
tab
:
'
blocks
'
}
})
}
>
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
internal_id
.
toString
(),
tab
:
'
blocks
'
}
})
}
>
{
blocksCount
.
toLocaleString
()
}
block
{
blocksCount
===
1
?
''
:
'
s
'
}
{
blocksCount
.
toLocaleString
()
}
block
{
blocksCount
===
1
?
''
:
'
s
'
}
</
Link
Internal
>
</
Link
>
{
'
'
}
in this batch
{
'
'
}
in this batch
</
Skeleton
>
</
Skeleton
>
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
...
...
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesListItem.tsx
View file @
4aaf1f1a
...
@@ -5,10 +5,10 @@ import type { OptimisticL2TxnBatchesItem } from 'types/api/optimisticL2';
...
@@ -5,10 +5,10 @@ import type { OptimisticL2TxnBatchesItem } from 'types/api/optimisticL2';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
OptimisticL2TxnBatchDA
from
'
ui/shared/batch/OptimisticL2TxnBatchDA
'
;
import
OptimisticL2TxnBatchDA
from
'
ui/shared/batch/OptimisticL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
...
@@ -51,33 +51,31 @@ const OptimisticL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -51,33 +51,31 @@ const OptimisticL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
L1 txn count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
L1 txn count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
>
<
Skeleton
loading=
{
isLoading
}
minW=
"40px"
>
{
item
.
l1_transaction_hashes
.
length
}
{
item
.
l1_transaction_hashes
.
length
}
</
Skeleton
>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
L2 blocks
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
L2 blocks
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Link
Internal
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
internal_id
.
toString
(),
tab
:
'
blocks
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
internal_id
.
toString
(),
tab
:
'
blocks
'
}
})
}
isLoading=
{
isLoading
}
loading=
{
isLoading
}
minW=
"40px"
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
>
{
item
.
l2_block_end
-
item
.
l2_block_start
+
1
}
{
item
.
l2_block_end
-
item
.
l2_block_start
+
1
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Txn
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Txn
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Link
Internal
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
internal_id
.
toString
(),
tab
:
'
txs
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
internal_id
.
toString
(),
tab
:
'
txs
'
}
})
}
isLoading=
{
isLoading
}
loading=
{
isLoading
}
minW=
"40px"
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
>
{
item
.
transaction_count
}
{
item
.
transaction_count
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Container
>
</
ListItemMobileGrid
.
Container
>
...
...
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2TxnBatchesItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2TxnBatchesItem
}
from
'
types/api/optimisticL2
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
OptimisticL2TxnBatchesTableItem
from
'
./OptimisticL2TxnBatchesTableItem
'
;
import
OptimisticL2TxnBatchesTableItem
from
'
./OptimisticL2TxnBatchesTableItem
'
;
...
@@ -15,18 +14,18 @@ type Props = {
...
@@ -15,18 +14,18 @@ type Props = {
const
OptimisticL2TxnBatchesTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
OptimisticL2TxnBatchesTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
minW=
"850px"
layout=
"auto
"
>
<
Table
Root
tableLayout=
"auto"
minW=
"850px
"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
>
Batch ID
</
Th
>
<
T
ableColumnHeader
>
Batch ID
</
TableColumnHeader
>
<
T
h
>
Storage
</
Th
>
<
T
ableColumnHeader
>
Storage
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
isNumeric
>
L1 txn count
</
Th
>
<
T
ableColumnHeader
isNumeric
>
L1 txn count
</
TableColumnHeader
>
<
T
h
isNumeric
>
L2 blocks
</
Th
>
<
T
ableColumnHeader
isNumeric
>
L2 blocks
</
TableColumnHeader
>
<
T
h
isNumeric
>
Txn
</
Th
>
<
T
ableColumnHeader
isNumeric
>
Txn
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
OptimisticL2TxnBatchesTableItem
<
OptimisticL2TxnBatchesTableItem
key=
{
item
.
internal_id
+
(
isLoading
?
String
(
index
)
:
''
)
}
key=
{
item
.
internal_id
+
(
isLoading
?
String
(
index
)
:
''
)
}
...
@@ -34,8 +33,8 @@ const OptimisticL2TxnBatchesTable = ({ items, top, isLoading }: Props) => {
...
@@ -34,8 +33,8 @@ const OptimisticL2TxnBatchesTable = ({ items, top, isLoading }: Props) => {
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesTableItem.tsx
View file @
4aaf1f1a
import
{
Td
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2TxnBatchesItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2TxnBatchesItem
}
from
'
types/api/optimisticL2
'
;
...
@@ -6,10 +5,11 @@ import type { OptimisticL2TxnBatchesItem } from 'types/api/optimisticL2';
...
@@ -6,10 +5,11 @@ import type { OptimisticL2TxnBatchesItem } from 'types/api/optimisticL2';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
OptimisticL2TxnBatchDA
from
'
ui/shared/batch/OptimisticL2TxnBatchDA
'
;
import
OptimisticL2TxnBatchDA
from
'
ui/shared/batch/OptimisticL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
const
rollupFeature
=
config
.
features
.
rollup
;
const
rollupFeature
=
config
.
features
.
rollup
;
...
@@ -22,14 +22,14 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => {
...
@@ -22,14 +22,14 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => {
}
}
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BatchEntityL2
number=
{
item
.
internal_id
}
isLoading=
{
isLoading
}
/>
<
BatchEntityL2
number=
{
item
.
internal_id
}
isLoading=
{
isLoading
}
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
batch_data_container
?
<
OptimisticL2TxnBatchDA
container=
{
item
.
batch_data_container
}
isLoading=
{
isLoading
}
/>
:
'
-
'
}
{
item
.
batch_data_container
?
<
OptimisticL2TxnBatchDA
container=
{
item
.
batch_data_container
}
isLoading=
{
isLoading
}
/>
:
'
-
'
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
l1_timestamp
}
timestamp=
{
item
.
l1_timestamp
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
...
@@ -37,35 +37,33 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => {
...
@@ -37,35 +37,33 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => {
color=
"text_secondary"
color=
"text_secondary"
my=
{
1
}
my=
{
1
}
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
isNumeric
>
<
T
ableCell
verticalAlign=
"middle"
isNumeric
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
minW=
"40px"
display=
"inline-block"
>
{
item
.
l1_transaction_hashes
.
length
}
{
item
.
l1_transaction_hashes
.
length
}
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
isNumeric
>
<
T
ableCell
verticalAlign=
"middle"
isNumeric
>
<
Link
Internal
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
internal_id
.
toString
(),
tab
:
'
blocks
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
internal_id
.
toString
(),
tab
:
'
blocks
'
}
})
}
isL
oading=
{
isLoading
}
l
oading=
{
isLoading
}
justifyContent=
"flex-end"
justifyContent=
"flex-end"
minW=
"40px"
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
display=
"inline-block"
>
{
item
.
l2_block_end
-
item
.
l2_block_start
+
1
}
{
item
.
l2_block_end
-
item
.
l2_block_start
+
1
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
TableCell
>
</
Td
>
<
TableCell
verticalAlign=
"middle"
isNumeric
>
<
Td
verticalAlign=
"middle"
isNumeric
>
<
Link
<
LinkInternal
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
internal_id
.
toString
(),
tab
:
'
txs
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
internal_id
.
toString
(),
tab
:
'
txs
'
}
})
}
isL
oading=
{
isLoading
}
l
oading=
{
isLoading
}
justifyContent=
"flex-end"
justifyContent=
"flex-end"
minW=
"40px"
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
display=
"inline-block"
>
{
item
.
transaction_count
}
{
item
.
transaction_count
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
TableCell
>
</
Td
>
</
TableRow
>
</
Tr
>
);
);
};
};
...
...
ui/txnBatches/scrollL2/ScrollL2TxnBatchDetails.tsx
View file @
4aaf1f1a
...
@@ -9,15 +9,15 @@ import { route } from 'nextjs-routes';
...
@@ -9,15 +9,15 @@ import { route } from 'nextjs-routes';
import
type
{
ResourceError
}
from
'
lib/api/resources
'
;
import
type
{
ResourceError
}
from
'
lib/api/resources
'
;
import
throwOnResourceLoadError
from
'
lib/errors/throwOnResourceLoadError
'
;
import
throwOnResourceLoadError
from
'
lib/errors/throwOnResourceLoadError
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
isCustomAppError
from
'
ui/shared/AppError/isCustomAppError
'
;
import
isCustomAppError
from
'
ui/shared/AppError/isCustomAppError
'
;
import
ScrollL2TxnBatchDA
from
'
ui/shared/batch/ScrollL2TxnBatchDA
'
;
import
ScrollL2TxnBatchDA
from
'
ui/shared/batch/ScrollL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
*
as
DetailedInfo
from
'
ui/shared/DetailedInfo/DetailedInfo
'
;
import
*
as
DetailedInfo
from
'
ui/shared/DetailedInfo/DetailedInfo
'
;
import
DetailedInfoTimestamp
from
'
ui/shared/DetailedInfo/DetailedInfoTimestamp
'
;
import
DetailedInfoTimestamp
from
'
ui/shared/DetailedInfo/DetailedInfoTimestamp
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
PrevNext
from
'
ui/shared/PrevNext
'
;
import
PrevNext
from
'
ui/shared/PrevNext
'
;
import
ScrollL2TxnBatchStatus
from
'
ui/shared/statusTag/ScrollL2TxnBatchStatus
'
;
import
ScrollL2TxnBatchStatus
from
'
ui/shared/statusTag/ScrollL2TxnBatchStatus
'
;
...
@@ -69,7 +69,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -69,7 +69,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
Txn batch number
Txn batch number
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Skeleton
loading=
{
isPlaceholderData
}
>
{
data
.
number
}
{
data
.
number
}
</
Skeleton
>
</
Skeleton
>
<
PrevNext
<
PrevNext
...
@@ -111,7 +111,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -111,7 +111,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
{
data
.
confirmation_transaction
.
timestamp
?
{
data
.
confirmation_transaction
.
timestamp
?
<
DetailedInfoTimestamp
timestamp=
{
data
.
confirmation_transaction
.
timestamp
}
isLoading=
{
isPlaceholderData
}
/>
:
<
DetailedInfoTimestamp
timestamp=
{
data
.
confirmation_transaction
.
timestamp
}
isLoading=
{
isPlaceholderData
}
/>
:
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
display=
"inline-block"
>
Pending
</
Skeleton
>
<
Skeleton
loading=
{
isPlaceholderData
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
}
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
...
@@ -122,11 +122,9 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -122,11 +122,9 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
Transactions
Transactions
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Link
loading=
{
isPlaceholderData
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
>
{
data
.
transaction_count
.
toLocaleString
()
}
transaction
{
data
.
transaction_count
===
1
?
''
:
'
s
'
}
{
data
.
transaction_count
.
toLocaleString
()
}
transaction
{
data
.
transaction_count
===
1
?
''
:
'
s
'
}
</
LinkInternal
>
</
Link
>
</
Skeleton
>
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemLabel
<
DetailedInfo
.
ItemLabel
...
@@ -136,11 +134,9 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -136,11 +134,9 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
Blocks
Blocks
</
DetailedInfo
.
ItemLabel
>
</
DetailedInfo
.
ItemLabel
>
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
>
<
Link
loading=
{
isPlaceholderData
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
number
.
toString
(),
tab
:
'
blocks
'
}
})
}
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
data
.
number
.
toString
(),
tab
:
'
blocks
'
}
})
}
>
{
blocksCount
.
toLocaleString
()
}
block
{
blocksCount
===
1
?
''
:
'
s
'
}
{
blocksCount
.
toLocaleString
()
}
block
{
blocksCount
===
1
?
''
:
'
s
'
}
</
LinkInternal
>
</
Link
>
</
Skeleton
>
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemLabel
<
DetailedInfo
.
ItemLabel
...
@@ -152,7 +148,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -152,7 +148,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
<
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemValue
>
{
data
.
commitment_transaction
.
timestamp
?
{
data
.
commitment_transaction
.
timestamp
?
<
DetailedInfoTimestamp
timestamp=
{
data
.
commitment_transaction
.
timestamp
}
isLoading=
{
isPlaceholderData
}
/>
:
<
DetailedInfoTimestamp
timestamp=
{
data
.
commitment_transaction
.
timestamp
}
isLoading=
{
isPlaceholderData
}
/>
:
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
display=
"inline-block"
>
Pending
</
Skeleton
>
<
Skeleton
loading=
{
isPlaceholderData
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
}
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
...
@@ -196,7 +192,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -196,7 +192,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
hash=
{
data
.
confirmation_transaction
.
hash
}
hash=
{
data
.
confirmation_transaction
.
hash
}
maxW=
"100%"
maxW=
"100%"
/>
/>
)
:
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
)
:
<
Skeleton
loading=
{
isPlaceholderData
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
<
DetailedInfo
.
ItemLabel
<
DetailedInfo
.
ItemLabel
...
@@ -211,7 +207,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -211,7 +207,7 @@ const ScrollL2TxnBatchDetails = ({ query }: Props) => {
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
number=
{
data
.
confirmation_transaction
.
block_number
}
number=
{
data
.
confirmation_transaction
.
block_number
}
/>
/>
)
:
<
Skeleton
isLoaded=
{
!
isPlaceholderData
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
)
:
<
Skeleton
loading=
{
isPlaceholderData
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
</
DetailedInfo
.
ItemValue
>
</
DetailedInfo
.
ItemValue
>
</
Grid
>
</
Grid
>
);
);
...
...
ui/txnBatches/scrollL2/ScrollL2TxnBatchesListItem.tsx
View file @
4aaf1f1a
...
@@ -5,12 +5,12 @@ import type { ScrollL2TxnBatch } from 'types/api/scrollL2';
...
@@ -5,12 +5,12 @@ import type { ScrollL2TxnBatch } from 'types/api/scrollL2';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
ScrollL2TxnBatchDA
from
'
ui/shared/batch/ScrollL2TxnBatchDA
'
;
import
ScrollL2TxnBatchDA
from
'
ui/shared/batch/ScrollL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ScrollL2TxnBatchStatus
from
'
ui/shared/statusTag/ScrollL2TxnBatchStatus
'
;
import
ScrollL2TxnBatchStatus
from
'
ui/shared/statusTag/ScrollL2TxnBatchStatus
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
...
@@ -32,8 +32,6 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -32,8 +32,6 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
BatchEntityL2
<
BatchEntityL2
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
number=
{
item
.
number
}
number=
{
item
.
number
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -53,8 +51,6 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -53,8 +51,6 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
commitment_transaction
.
block_number
}
number=
{
item
.
commitment_transaction
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -63,8 +59,6 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -63,8 +59,6 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
TxEntityL1
<
TxEntityL1
hash=
{
item
.
commitment_transaction
.
hash
}
hash=
{
item
.
commitment_transaction
.
hash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -84,10 +78,8 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -84,10 +78,8 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
confirmation_transaction
.
block_number
}
number=
{
item
.
confirmation_transaction
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
)
:
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
)
:
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Finalized txn hash
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Finalized txn hash
</
ListItemMobileGrid
.
Label
>
...
@@ -96,36 +88,32 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -96,36 +88,32 @@ const ScrollL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
<
TxEntityL1
<
TxEntityL1
hash=
{
item
.
confirmation_transaction
.
hash
}
hash=
{
item
.
confirmation_transaction
.
hash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
)
:
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
)
:
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Blocks count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Blocks count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Link
Internal
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
blocks
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
blocks
'
}
})
}
isL
oading=
{
isLoading
}
l
oading=
{
isLoading
}
fontWeight=
{
600
}
fontWeight=
{
600
}
minW=
"40px"
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
>
{
(
item
.
end_block
-
item
.
start_block
+
1
).
toLocaleString
()
}
{
(
item
.
end_block
-
item
.
start_block
+
1
).
toLocaleString
()
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Txn count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Txn count
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Link
Internal
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
isL
oading=
{
isLoading
}
l
oading=
{
isLoading
}
fontWeight=
{
600
}
fontWeight=
{
600
}
minW=
"40px"
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
minW=
"40px"
>
{
item
.
transaction_count
.
toLocaleString
()
}
{
item
.
transaction_count
.
toLocaleString
()
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Container
>
</
ListItemMobileGrid
.
Container
>
...
...
ui/txnBatches/scrollL2/ScrollL2TxnBatchesTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ScrollL2TxnBatch
}
from
'
types/api/scrollL2
'
;
import
type
{
ScrollL2TxnBatch
}
from
'
types/api/scrollL2
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
ScrollL2TxnBatchesTableItem
from
'
./ScrollL2TxnBatchesTableItem
'
;
import
ScrollL2TxnBatchesTableItem
from
'
./ScrollL2TxnBatchesTableItem
'
;
...
@@ -15,22 +14,22 @@ type Props = {
...
@@ -15,22 +14,22 @@ type Props = {
const
ScrollL2TxnBatchesTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
ScrollL2TxnBatchesTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
minW=
"1000px"
style=
{
{
tableLayout
:
'
auto
'
}
}
>
<
Table
Root
tableLayout=
"auto"
minW=
"1000px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
>
Batch #
</
Th
>
<
T
ableColumnHeader
>
Batch #
</
TableColumnHeader
>
<
T
h
>
Container
</
Th
>
<
T
ableColumnHeader
>
Container
</
TableColumnHeader
>
<
T
h
>
Status
</
Th
>
<
T
ableColumnHeader
>
Status
</
TableColumnHeader
>
<
T
h
>
Committed block
</
Th
>
<
T
ableColumnHeader
>
Committed block
</
TableColumnHeader
>
<
T
h
>
Committed txn hash
</
Th
>
<
T
ableColumnHeader
>
Committed txn hash
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
>
Finalized block
</
Th
>
<
T
ableColumnHeader
>
Finalized block
</
TableColumnHeader
>
<
T
h
>
Finalized txn hash
</
Th
>
<
T
ableColumnHeader
>
Finalized txn hash
</
TableColumnHeader
>
<
T
h
isNumeric
>
Blocks
</
Th
>
<
T
ableColumnHeader
isNumeric
>
Blocks
</
TableColumnHeader
>
<
T
h
isNumeric
>
Txn
</
Th
>
<
T
ableColumnHeader
isNumeric
>
Txn
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
ScrollL2TxnBatchesTableItem
<
ScrollL2TxnBatchesTableItem
key=
{
item
.
number
+
(
isLoading
?
String
(
index
)
:
''
)
}
key=
{
item
.
number
+
(
isLoading
?
String
(
index
)
:
''
)
}
...
@@ -38,8 +37,8 @@ const ScrollL2TxnBatchesTable = ({ items, top, isLoading }: Props) => {
...
@@ -38,8 +37,8 @@ const ScrollL2TxnBatchesTable = ({ items, top, isLoading }: Props) => {
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/txnBatches/scrollL2/ScrollL2TxnBatchesTableItem.tsx
View file @
4aaf1f1a
import
{
Td
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ScrollL2TxnBatch
}
from
'
types/api/scrollL2
'
;
import
type
{
ScrollL2TxnBatch
}
from
'
types/api/scrollL2
'
;
...
@@ -6,12 +5,13 @@ import type { ScrollL2TxnBatch } from 'types/api/scrollL2';
...
@@ -6,12 +5,13 @@ import type { ScrollL2TxnBatch } from 'types/api/scrollL2';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
ScrollL2TxnBatchDA
from
'
ui/shared/batch/ScrollL2TxnBatchDA
'
;
import
ScrollL2TxnBatchDA
from
'
ui/shared/batch/ScrollL2TxnBatchDA
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BatchEntityL2
from
'
ui/shared/entities/block/BatchEntityL2
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
ScrollL2TxnBatchStatus
from
'
ui/shared/statusTag/ScrollL2TxnBatchStatus
'
;
import
ScrollL2TxnBatchStatus
from
'
ui/shared/statusTag/ScrollL2TxnBatchStatus
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
...
@@ -25,90 +25,76 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => {
...
@@ -25,90 +25,76 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => {
}
}
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BatchEntityL2
<
BatchEntityL2
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
number=
{
item
.
number
}
number=
{
item
.
number
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
ScrollL2TxnBatchDA
container=
{
item
.
data_availability
?.
batch_data_container
}
isLoading=
{
isLoading
}
/>
<
ScrollL2TxnBatchDA
container=
{
item
.
data_availability
?.
batch_data_container
}
isLoading=
{
isLoading
}
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
ScrollL2TxnBatchStatus
status=
{
item
.
confirmation_transaction
.
hash
?
'
Finalized
'
:
'
Committed
'
}
isLoading=
{
isLoading
}
/>
<
ScrollL2TxnBatchStatus
status=
{
item
.
confirmation_transaction
.
hash
?
'
Finalized
'
:
'
Committed
'
}
isLoading=
{
isLoading
}
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
commitment_transaction
.
block_number
}
number=
{
item
.
commitment_transaction
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TxEntityL1
<
TxEntityL1
hash=
{
item
.
commitment_transaction
.
hash
}
hash=
{
item
.
commitment_transaction
.
hash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
commitment_transaction
.
timestamp
}
timestamp=
{
item
.
commitment_transaction
.
timestamp
}
fallbackText=
"Undefined"
fallbackText=
"Undefined"
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
color=
"text_secondary"
color=
"text_secondary"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
confirmation_transaction
.
block_number
?
(
{
item
.
confirmation_transaction
.
block_number
?
(
<
BlockEntityL1
<
BlockEntityL1
number=
{
item
.
confirmation_transaction
.
block_number
}
number=
{
item
.
confirmation_transaction
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
)
:
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
)
:
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
confirmation_transaction
.
hash
?
(
{
item
.
confirmation_transaction
.
hash
?
(
<
TxEntityL1
<
TxEntityL1
hash=
{
item
.
confirmation_transaction
.
hash
}
hash=
{
item
.
confirmation_transaction
.
hash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
)
:
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
)
:
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
Pending
</
Skeleton
>
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
isNumeric
>
<
T
ableCell
verticalAlign=
"middle"
isNumeric
>
<
Link
Internal
<
Link
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
blocks
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
blocks
'
}
})
}
isL
oading=
{
isLoading
}
l
oading=
{
isLoading
}
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
(
item
.
end_block
-
item
.
start_block
+
1
).
toLocaleString
()
}
{
(
item
.
end_block
-
item
.
start_block
+
1
).
toLocaleString
()
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
TableCell
>
</
Td
>
<
TableCell
verticalAlign=
"middle"
isNumeric
>
<
Td
verticalAlign=
"middle"
isNumeric
>
<
Link
<
LinkInternal
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
href=
{
route
({
pathname
:
'
/batches/[number]
'
,
query
:
{
number
:
item
.
number
.
toString
(),
tab
:
'
txs
'
}
})
}
isL
oading=
{
isLoading
}
l
oading=
{
isLoading
}
>
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
item
.
transaction_count
.
toLocaleString
()
}
{
item
.
transaction_count
.
toLocaleString
()
}
</
Skeleton
>
</
Link
>
</
LinkInternal
>
</
TableCell
>
</
Td
>
</
TableRow
>
</
Tr
>
);
);
};
};
...
...
ui/txnWithdrawals/arbitrumL2/ArbitrumL2TxnWithdrawalsClaimButton.tsx
View file @
4aaf1f1a
import
{
Button
}
from
'
@chakra-ui/react
'
;
import
{
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
{
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
useSendTransaction
,
useSwitchChain
}
from
'
wagmi
'
;
import
{
useSendTransaction
,
useSwitchChain
}
from
'
wagmi
'
;
...
@@ -13,9 +12,10 @@ import capitalizeFirstLetter from 'lib/capitalizeFirstLetter';
...
@@ -13,9 +12,10 @@ import capitalizeFirstLetter from 'lib/capitalizeFirstLetter';
import
getErrorMessage
from
'
lib/errors/getErrorMessage
'
;
import
getErrorMessage
from
'
lib/errors/getErrorMessage
'
;
import
getErrorObjPayload
from
'
lib/errors/getErrorObjPayload
'
;
import
getErrorObjPayload
from
'
lib/errors/getErrorObjPayload
'
;
import
getErrorProp
from
'
lib/errors/getErrorProp
'
;
import
getErrorProp
from
'
lib/errors/getErrorProp
'
;
import
useToast
from
'
lib/hooks/useToast
'
;
import
useWallet
from
'
lib/web3/useWallet
'
;
import
useWallet
from
'
lib/web3/useWallet
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Button
}
from
'
toolkit/chakra/button
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
toaster
}
from
'
toolkit/chakra/toaster
'
;
import
ArbitrumL2TxnWithdrawalsClaimTx
from
'
./ArbitrumL2TxnWithdrawalsClaimTx
'
;
import
ArbitrumL2TxnWithdrawalsClaimTx
from
'
./ArbitrumL2TxnWithdrawalsClaimTx
'
;
...
@@ -32,7 +32,6 @@ const ArbitrumL2TxnWithdrawalsClaimButton = ({ messageId, txHash, completionTxHa
...
@@ -32,7 +32,6 @@ const ArbitrumL2TxnWithdrawalsClaimButton = ({ messageId, txHash, completionTxHa
const
[
isPending
,
setIsPending
]
=
React
.
useState
(
false
);
const
[
isPending
,
setIsPending
]
=
React
.
useState
(
false
);
const
[
claimTxHash
,
setClaimTxHash
]
=
React
.
useState
<
string
|
undefined
>
(
completionTxHash
);
const
[
claimTxHash
,
setClaimTxHash
]
=
React
.
useState
<
string
|
undefined
>
(
completionTxHash
);
const
apiFetch
=
useApiFetch
();
const
apiFetch
=
useApiFetch
();
const
toast
=
useToast
();
const
{
sendTransactionAsync
}
=
useSendTransaction
();
const
{
sendTransactionAsync
}
=
useSendTransaction
();
const
{
switchChainAsync
}
=
useSwitchChain
();
const
{
switchChainAsync
}
=
useSwitchChain
();
...
@@ -65,14 +64,13 @@ const ArbitrumL2TxnWithdrawalsClaimButton = ({ messageId, txHash, completionTxHa
...
@@ -65,14 +64,13 @@ const ArbitrumL2TxnWithdrawalsClaimButton = ({ messageId, txHash, completionTxHa
}
catch
(
error
)
{
}
catch
(
error
)
{
const
apiError
=
getErrorObjPayload
<
{
message
:
string
}
>
(
error
);
const
apiError
=
getErrorObjPayload
<
{
message
:
string
}
>
(
error
);
const
message
=
capitalizeFirstLetter
(
apiError
?.
message
||
getErrorProp
(
error
,
'
shortMessage
'
)
||
getErrorMessage
(
error
)
||
'
Something went wrong
'
);
const
message
=
capitalizeFirstLetter
(
apiError
?.
message
||
getErrorProp
(
error
,
'
shortMessage
'
)
||
getErrorMessage
(
error
)
||
'
Something went wrong
'
);
toast
({
toaster
.
error
({
status
:
'
error
'
,
title
:
'
Error
'
,
title
:
'
Error
'
,
description
:
message
,
description
:
message
,
});
});
setIsPending
(
false
);
setIsPending
(
false
);
}
}
},
[
apiFetch
,
messageId
,
sendTransactionAsync
,
toast
,
switchChainAsync
]);
},
[
apiFetch
,
messageId
,
sendTransactionAsync
,
switchChainAsync
]);
const
web3Wallet
=
useWallet
({
source
:
'
Smart contracts
'
,
onConnect
:
sendClaimTx
});
const
web3Wallet
=
useWallet
({
source
:
'
Smart contracts
'
,
onConnect
:
sendClaimTx
});
...
@@ -103,13 +101,12 @@ const ArbitrumL2TxnWithdrawalsClaimButton = ({ messageId, txHash, completionTxHa
...
@@ -103,13 +101,12 @@ const ArbitrumL2TxnWithdrawalsClaimButton = ({ messageId, txHash, completionTxHa
},
[
messageId
,
queryClient
,
txHash
]);
},
[
messageId
,
queryClient
,
txHash
]);
const
handleError
=
React
.
useCallback
((
error
:
Error
)
=>
{
const
handleError
=
React
.
useCallback
((
error
:
Error
)
=>
{
toast
({
toaster
.
error
({
status
:
'
error
'
,
title
:
'
Error
'
,
title
:
'
Error
'
,
description
:
error
.
message
,
description
:
error
.
message
,
});
});
setIsPending
(
false
);
setIsPending
(
false
);
},
[
toast
]);
},
[
]);
if
(
claimTxHash
)
{
if
(
claimTxHash
)
{
return
(
return
(
...
@@ -125,12 +122,12 @@ const ArbitrumL2TxnWithdrawalsClaimButton = ({ messageId, txHash, completionTxHa
...
@@ -125,12 +122,12 @@ const ArbitrumL2TxnWithdrawalsClaimButton = ({ messageId, txHash, completionTxHa
const
isLoading
=
isPending
||
web3Wallet
.
isOpen
;
const
isLoading
=
isPending
||
web3Wallet
.
isOpen
;
return
(
return
(
<
Skeleton
isLoaded=
{
!
isDataLoading
}
>
<
Skeleton
loading=
{
isDataLoading
}
>
<
Button
<
Button
size=
"sm"
size=
"sm"
variant=
"outline"
variant=
"outline"
onClick=
{
handleClaimClick
}
onClick=
{
handleClaimClick
}
isL
oading=
{
isLoading
}
l
oading=
{
isLoading
}
loadingText=
"Claim"
loadingText=
"Claim"
>
>
Claim
Claim
...
...
ui/txnWithdrawals/arbitrumL2/ArbitrumL2TxnWithdrawalsListItem.tsx
View file @
4aaf1f1a
...
@@ -3,7 +3,7 @@ import React from 'react';
...
@@ -3,7 +3,7 @@ import React from 'react';
import
type
{
ArbitrumL2TxnWithdrawalsItem
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2TxnWithdrawalsItem
}
from
'
types/api/arbitrumL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/S
keleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/s
keleton
'
;
import
AddressEntityL1
from
'
ui/shared/entities/address/AddressEntityL1
'
;
import
AddressEntityL1
from
'
ui/shared/entities/address/AddressEntityL1
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ArbitrumL2MessageStatus
from
'
ui/shared/statusTag/ArbitrumL2MessageStatus
'
;
import
ArbitrumL2MessageStatus
from
'
ui/shared/statusTag/ArbitrumL2MessageStatus
'
;
...
@@ -29,7 +29,7 @@ const ArbitrumL2TxnWithdrawalsListItem = ({ data, isLoading, txHash }: Props) =>
...
@@ -29,7 +29,7 @@ const ArbitrumL2TxnWithdrawalsListItem = ({ data, isLoading, txHash }: Props) =>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Message #
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Message #
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
data
.
id
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
>
{
data
.
id
}
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Receiver
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Receiver
</
ListItemMobileGrid
.
Label
>
...
@@ -39,7 +39,7 @@ const ArbitrumL2TxnWithdrawalsListItem = ({ data, isLoading, txHash }: Props) =>
...
@@ -39,7 +39,7 @@ const ArbitrumL2TxnWithdrawalsListItem = ({ data, isLoading, txHash }: Props) =>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Value
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Value
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
loading=
{
isLoading
}
>
<
ArbitrumL2TxnWithdrawalsValue
data=
{
data
}
/>
<
ArbitrumL2TxnWithdrawalsValue
data=
{
data
}
/>
</
Skeleton
>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
...
ui/txnWithdrawals/arbitrumL2/ArbitrumL2TxnWithdrawalsTable.tsx
View file @
4aaf1f1a
import
{
Tbody
,
Tr
,
Thead
,
Table
,
Th
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ArbitrumL2TxnWithdrawalsItem
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2TxnWithdrawalsItem
}
from
'
types/api/arbitrumL2
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeader
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
ArbitrumL2TxnWithdrawalsTableItem
from
'
./ArbitrumL2TxnWithdrawalsTableItem
'
;
import
ArbitrumL2TxnWithdrawalsTableItem
from
'
./ArbitrumL2TxnWithdrawalsTableItem
'
;
interface
Props
{
interface
Props
{
...
@@ -13,16 +14,16 @@ interface Props {
...
@@ -13,16 +14,16 @@ interface Props {
const
ArbitrumL2TxnWithdrawalsTable
=
({
data
,
txHash
,
isLoading
}:
Props
)
=>
{
const
ArbitrumL2TxnWithdrawalsTable
=
({
data
,
txHash
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
minW=
"900px"
>
<
Table
Root
minW=
"900px"
>
<
T
head
>
<
T
ableHeader
>
<
T
r
>
<
T
ableRow
>
<
T
h
width=
"150px"
>
Message #
</
Th
>
<
T
ableColumnHeader
width=
"150px"
>
Message #
</
TableColumnHeader
>
<
T
h
width=
"30%"
>
Receiver
</
Th
>
<
T
ableColumnHeader
width=
"30%"
>
Receiver
</
TableColumnHeader
>
<
T
h
width=
"30%"
isNumeric
>
Value
</
Th
>
<
T
ableColumnHeader
width=
"30%"
isNumeric
>
Value
</
TableColumnHeader
>
<
T
h
width=
"40%"
>
Status
</
Th
>
<
T
ableColumnHeader
width=
"40%"
>
Status
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeader
>
<
T
b
ody
>
<
T
ableB
ody
>
{
data
.
map
((
item
,
index
)
=>
(
{
data
.
map
((
item
,
index
)
=>
(
<
ArbitrumL2TxnWithdrawalsTableItem
<
ArbitrumL2TxnWithdrawalsTableItem
key=
{
String
(
item
.
id
)
+
(
isLoading
?
index
:
''
)
}
key=
{
String
(
item
.
id
)
+
(
isLoading
?
index
:
''
)
}
...
@@ -30,8 +31,8 @@ const ArbitrumL2TxnWithdrawalsTable = ({ data, txHash, isLoading }: Props) => {
...
@@ -30,8 +31,8 @@ const ArbitrumL2TxnWithdrawalsTable = ({ data, txHash, isLoading }: Props) => {
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
txHash=
{
txHash
}
/>
txHash=
{
txHash
}
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/txnWithdrawals/arbitrumL2/ArbitrumL2TxnWithdrawalsTableItem.tsx
View file @
4aaf1f1a
import
{
Tr
,
Td
,
Flex
}
from
'
@chakra-ui/react
'
;
import
{
Flex
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ArbitrumL2TxnWithdrawalsItem
}
from
'
types/api/arbitrumL2
'
;
import
type
{
ArbitrumL2TxnWithdrawalsItem
}
from
'
types/api/arbitrumL2
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
AddressEntityL1
from
'
ui/shared/entities/address/AddressEntityL1
'
;
import
AddressEntityL1
from
'
ui/shared/entities/address/AddressEntityL1
'
;
import
ArbitrumL2MessageStatus
from
'
ui/shared/statusTag/ArbitrumL2MessageStatus
'
;
import
ArbitrumL2MessageStatus
from
'
ui/shared/statusTag/ArbitrumL2MessageStatus
'
;
...
@@ -18,19 +19,19 @@ interface Props {
...
@@ -18,19 +19,19 @@ interface Props {
const
ArbitrumL2TxnWithdrawalsTableItem
=
({
data
,
isLoading
,
txHash
}:
Props
)
=>
{
const
ArbitrumL2TxnWithdrawalsTableItem
=
({
data
,
isLoading
,
txHash
}:
Props
)
=>
{
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
data
.
id
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
>
{
data
.
id
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
AddressEntityL1
address=
{
{
hash
:
data
.
token
?.
destination
||
data
.
destination
}
}
isLoading=
{
isLoading
}
/>
<
AddressEntityL1
address=
{
{
hash
:
data
.
token
?.
destination
||
data
.
destination
}
}
isLoading=
{
isLoading
}
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
isNumeric
>
<
T
ableCell
verticalAlign=
"middle"
isNumeric
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
loading=
{
isLoading
}
>
<
ArbitrumL2TxnWithdrawalsValue
data=
{
data
}
/>
<
ArbitrumL2TxnWithdrawalsValue
data=
{
data
}
/>
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Flex
alignItems=
"center"
justifyContent=
"space-between"
columnGap=
{
8
}
>
<
Flex
alignItems=
"center"
justifyContent=
"space-between"
columnGap=
{
8
}
>
<
ArbitrumL2MessageStatus
status=
{
data
.
status
}
isLoading=
{
isLoading
}
/>
<
ArbitrumL2MessageStatus
status=
{
data
.
status
}
isLoading=
{
isLoading
}
/>
{
(
data
.
status
===
'
confirmed
'
||
data
.
status
===
'
relayed
'
)
&&
(
{
(
data
.
status
===
'
confirmed
'
||
data
.
status
===
'
relayed
'
)
&&
(
...
@@ -42,8 +43,8 @@ const ArbitrumL2TxnWithdrawalsTableItem = ({ data, isLoading, txHash }: Props) =
...
@@ -42,8 +43,8 @@ const ArbitrumL2TxnWithdrawalsTableItem = ({ data, isLoading, txHash }: Props) =
/>
/>
)
}
)
}
</
Flex
>
</
Flex
>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
ui/withdrawals/optimisticL2/OptimisticL2WithdrawalsListItem.tsx
View file @
4aaf1f1a
...
@@ -4,11 +4,11 @@ import type { OptimisticL2WithdrawalsItem } from 'types/api/optimisticL2';
...
@@ -4,11 +4,11 @@ import type { OptimisticL2WithdrawalsItem } from 'types/api/optimisticL2';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkExternal
from
'
ui/shared/links/LinkExternal
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
ListItemMobileGrid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
...
@@ -28,7 +28,7 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
...
@@ -28,7 +28,7 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Msg nonce
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Msg nonce
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
msg_nonce_version
+
'
-
'
+
item
.
msg_nonce
}
{
item
.
msg_nonce_version
+
'
-
'
+
item
.
msg_nonce
}
</
Skeleton
>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -51,8 +51,6 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
...
@@ -51,8 +51,6 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l2_transaction_hash
}
hash=
{
item
.
l2_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -73,8 +71,8 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
...
@@ -73,8 +71,8 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Status
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Status
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
{
item
.
status
===
'
Ready for relay
'
&&
rollupFeature
.
L2WithdrawalUrl
?
{
item
.
status
===
'
Ready for relay
'
&&
rollupFeature
.
L2WithdrawalUrl
?
<
Link
External
href=
{
rollupFeature
.
L2WithdrawalUrl
}
>
{
item
.
status
}
</
LinkExternal
>
:
<
Link
external
href=
{
rollupFeature
.
L2WithdrawalUrl
}
>
{
item
.
status
}
</
Link
>
:
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
status
}
</
Skeleton
>
}
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
status
}
</
Skeleton
>
}
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
{
item
.
l1_transaction_hash
&&
(
{
item
.
l1_transaction_hash
&&
(
...
@@ -84,8 +82,6 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
...
@@ -84,8 +82,6 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l1_transaction_hash
}
hash=
{
item
.
l1_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
...
ui/withdrawals/optimisticL2/OptimisticL2WithdrawalsTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2WithdrawalsItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2WithdrawalsItem
}
from
'
types/api/optimisticL2
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
OptimisticL2WithdrawalsTableItem
from
'
./OptimisticL2WithdrawalsTableItem
'
;
import
OptimisticL2WithdrawalsTableItem
from
'
./OptimisticL2WithdrawalsTableItem
'
;
...
@@ -15,19 +14,19 @@ import OptimisticL2WithdrawalsTableItem from './OptimisticL2WithdrawalsTableItem
...
@@ -15,19 +14,19 @@ import OptimisticL2WithdrawalsTableItem from './OptimisticL2WithdrawalsTableItem
const
OptimisticL2WithdrawalsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
OptimisticL2WithdrawalsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
style=
{
{
tableLayout
:
'
auto
'
}
}
minW=
"950px"
>
<
Table
Root
tableLayout=
"auto"
minW=
"950px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
>
Msg nonce
</
Th
>
<
T
ableColumnHeader
>
Msg nonce
</
TableColumnHeader
>
<
T
h
>
From
</
Th
>
<
T
ableColumnHeader
>
From
</
TableColumnHeader
>
<
T
h
>
L2 txn hash
</
Th
>
<
T
ableColumnHeader
>
L2 txn hash
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
>
Status
</
Th
>
<
T
ableColumnHeader
>
Status
</
TableColumnHeader
>
<
T
h
>
L1 txn hash
</
Th
>
<
T
ableColumnHeader
>
L1 txn hash
</
TableColumnHeader
>
<
T
h
>
Time left
</
Th
>
<
T
ableColumnHeader
>
Time left
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
OptimisticL2WithdrawalsTableItem
<
OptimisticL2WithdrawalsTableItem
key=
{
String
(
item
.
msg_nonce_version
)
+
item
.
msg_nonce
+
(
isLoading
?
index
:
''
)
}
key=
{
String
(
item
.
msg_nonce_version
)
+
item
.
msg_nonce
+
(
isLoading
?
index
:
''
)
}
...
@@ -35,8 +34,8 @@ const OptimisticL2WithdrawalsTable = ({ items, top, isLoading }: Props) => {
...
@@ -35,8 +34,8 @@ const OptimisticL2WithdrawalsTable = ({ items, top, isLoading }: Props) => {
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/withdrawals/optimisticL2/OptimisticL2WithdrawalsTableItem.tsx
View file @
4aaf1f1a
import
{
Td
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
OptimisticL2WithdrawalsItem
}
from
'
types/api/optimisticL2
'
;
import
type
{
OptimisticL2WithdrawalsItem
}
from
'
types/api/optimisticL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
LinkExternal
from
'
ui/shared/links/LinkExternal
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
import
TimeAgoWithTooltip
from
'
ui/shared/TimeAgoWithTooltip
'
;
const
rollupFeature
=
config
.
features
.
rollup
;
const
rollupFeature
=
config
.
features
.
rollup
;
...
@@ -24,11 +24,11 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
...
@@ -24,11 +24,11 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
}
}
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
fontWeight=
{
600
}
>
<
T
ableCell
verticalAlign=
"middle"
fontWeight=
{
600
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
msg_nonce_version
+
'
-
'
+
item
.
msg_nonce
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
msg_nonce_version
+
'
-
'
+
item
.
msg_nonce
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
from
?
(
{
item
.
from
?
(
<
AddressEntity
<
AddressEntity
address=
{
item
.
from
}
address=
{
item
.
from
}
...
@@ -36,18 +36,16 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
...
@@ -36,18 +36,16 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
truncation=
"constant"
truncation=
"constant"
/>
/>
)
:
'
N/A
'
}
)
:
'
N/A
'
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l2_transaction_hash
}
hash=
{
item
.
l2_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
pr=
{
12
}
>
<
T
ableCell
verticalAlign=
"middle"
pr=
{
12
}
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
l2_timestamp
}
timestamp=
{
item
.
l2_timestamp
}
fallbackText=
"N/A"
fallbackText=
"N/A"
...
@@ -55,31 +53,29 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
...
@@ -55,31 +53,29 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
display=
"inline-block"
display=
"inline-block"
color=
"text_secondary"
color=
"text_secondary"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
status
===
'
Ready for relay
'
&&
rollupFeature
.
L2WithdrawalUrl
?
{
item
.
status
===
'
Ready for relay
'
&&
rollupFeature
.
L2WithdrawalUrl
?
<
Link
External
href=
{
rollupFeature
.
L2WithdrawalUrl
}
>
{
item
.
status
}
</
LinkExternal
>
:
<
Link
external
href=
{
rollupFeature
.
L2WithdrawalUrl
}
>
{
item
.
status
}
</
Link
>
:
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
{
item
.
status
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
status
}
</
Skeleton
>
}
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
l1_transaction_hash
?
(
{
item
.
l1_transaction_hash
?
(
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
l1_transaction_hash
}
hash=
{
item
.
l1_transaction_hash
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
)
:
)
:
'
N/A
'
'
N/A
'
}
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
color=
"text_secondary"
minW=
"50px"
minH=
"20px"
display=
"inline-block"
>
{
timeToEnd
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
color=
"text_secondary"
minW=
"50px"
minH=
"20px"
display=
"inline-block"
>
{
timeToEnd
}
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
ui/withdrawals/scrollL2/ScrollL2WithdrawalsListItem.tsx
View file @
4aaf1f1a
...
@@ -5,7 +5,7 @@ import type { ScrollL2MessageItem } from 'types/api/scrollL2';
...
@@ -5,7 +5,7 @@ import type { ScrollL2MessageItem } from 'types/api/scrollL2';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
Skeleton
from
'
ui/shared/chakra/S
keleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/s
keleton
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
...
@@ -31,15 +31,13 @@ const ScrollL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
...
@@ -31,15 +31,13 @@ const ScrollL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<
BlockEntity
<
BlockEntity
number=
{
item
.
origination_transaction_block_number
}
number=
{
item
.
origination_transaction_block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Index
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
item
.
id
}
{
item
.
id
}
</
Skeleton
>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -49,8 +47,6 @@ const ScrollL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
...
@@ -49,8 +47,6 @@ const ScrollL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
origination_transaction_hash
}
hash=
{
item
.
origination_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
@@ -70,8 +66,6 @@ const ScrollL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
...
@@ -70,8 +66,6 @@ const ScrollL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
completion_transaction_hash
}
hash=
{
item
.
completion_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
/>
/>
)
:
(
)
:
(
...
@@ -83,7 +77,7 @@ const ScrollL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
...
@@ -83,7 +77,7 @@ const ScrollL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Value
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Value
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
{
`${ valueStr } ${ config.chain.currency.symbol }`
}
{
`${ valueStr } ${ config.chain.currency.symbol }`
}
</
Skeleton
>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
...
...
ui/withdrawals/scrollL2/ScrollL2WithdrawalsTable.tsx
View file @
4aaf1f1a
import
{
Table
,
Tbody
,
Th
,
Tr
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ScrollL2MessageItem
}
from
'
types/api/scrollL2
'
;
import
type
{
ScrollL2MessageItem
}
from
'
types/api/scrollL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
TableBody
,
TableColumnHeader
,
TableHeaderSticky
,
TableRoot
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
ScrollL2WithdrawalsTableItem
from
'
./ScrollL2WithdrawalsTableItem
'
;
import
ScrollL2WithdrawalsTableItem
from
'
./ScrollL2WithdrawalsTableItem
'
;
...
@@ -16,23 +15,23 @@ import ScrollL2WithdrawalsTableItem from './ScrollL2WithdrawalsTableItem';
...
@@ -16,23 +15,23 @@ import ScrollL2WithdrawalsTableItem from './ScrollL2WithdrawalsTableItem';
const
ScrollL2WithdrawalsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
const
ScrollL2WithdrawalsTable
=
({
items
,
top
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Table
style=
{
{
tableLayout
:
'
auto
'
}
}
minW=
"950px"
>
<
Table
Root
tableLayout=
"auto"
minW=
"950px"
>
<
T
head
top=
{
top
}
>
<
T
ableHeaderSticky
top=
{
top
}
>
<
T
r
>
<
T
ableRow
>
<
T
h
>
L2 block
</
Th
>
<
T
ableColumnHeader
>
L2 block
</
TableColumnHeader
>
<
T
h
>
Index
</
Th
>
<
T
ableColumnHeader
>
Index
</
TableColumnHeader
>
<
T
h
>
L2 txn hash
</
Th
>
<
T
ableColumnHeader
>
L2 txn hash
</
TableColumnHeader
>
<
T
h
>
Age
</
Th
>
<
T
ableColumnHeader
>
Age
</
TableColumnHeader
>
<
T
h
>
L1 txn hash
</
Th
>
<
T
ableColumnHeader
>
L1 txn hash
</
TableColumnHeader
>
<
T
h
isNumeric
>
{
`Value ${ config.chain.currency.symbol }`
}
</
Th
>
<
T
ableColumnHeader
isNumeric
>
{
`Value ${ config.chain.currency.symbol }`
}
</
TableColumnHeader
>
</
T
r
>
</
T
ableRow
>
</
T
head
>
</
T
ableHeaderSticky
>
<
T
b
ody
>
<
T
ableB
ody
>
{
items
.
map
((
item
,
index
)
=>
(
{
items
.
map
((
item
,
index
)
=>
(
<
ScrollL2WithdrawalsTableItem
key=
{
String
(
item
.
id
)
+
(
isLoading
?
index
:
''
)
}
item=
{
item
}
isLoading=
{
isLoading
}
/>
<
ScrollL2WithdrawalsTableItem
key=
{
String
(
item
.
id
)
+
(
isLoading
?
index
:
''
)
}
item=
{
item
}
isLoading=
{
isLoading
}
/>
))
}
))
}
</
T
b
ody
>
</
T
ableB
ody
>
</
Table
>
</
Table
Root
>
);
);
};
};
...
...
ui/withdrawals/scrollL2/ScrollL2WithdrawalsTableItem.tsx
View file @
4aaf1f1a
import
{
Td
,
Tr
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
ScrollL2MessageItem
}
from
'
types/api/scrollL2
'
;
import
type
{
ScrollL2MessageItem
}
from
'
types/api/scrollL2
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/skeleton
'
;
import
{
TableCell
,
TableRow
}
from
'
toolkit/chakra/table
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
...
@@ -22,61 +23,55 @@ const ScrollL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
...
@@ -22,61 +23,55 @@ const ScrollL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
const
{
valueStr
}
=
getCurrencyValue
({
value
:
item
.
value
,
decimals
:
String
(
config
.
chain
.
currency
.
decimals
)
});
const
{
valueStr
}
=
getCurrencyValue
({
value
:
item
.
value
,
decimals
:
String
(
config
.
chain
.
currency
.
decimals
)
});
return
(
return
(
<
T
r
>
<
T
ableRow
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
BlockEntity
<
BlockEntity
number=
{
item
.
origination_transaction_block_number
}
number=
{
item
.
origination_transaction_block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
fontWeight=
{
600
}
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
loading=
{
isLoading
}
>
<
span
>
{
item
.
id
}
</
span
>
<
span
>
{
item
.
id
}
</
span
>
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
<
TxEntity
<
TxEntity
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
origination_transaction_hash
}
hash=
{
item
.
origination_transaction_hash
}
fontSize=
"sm"
lineHeight=
{
5
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
pr=
{
12
}
>
<
T
ableCell
verticalAlign=
"middle"
pr=
{
12
}
>
<
TimeAgoWithTooltip
<
TimeAgoWithTooltip
timestamp=
{
item
.
origination_timestamp
}
timestamp=
{
item
.
origination_timestamp
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
color=
"text_secondary"
color=
"text_secondary"
/>
/>
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
>
<
T
ableCell
verticalAlign=
"middle"
>
{
item
.
completion_transaction_hash
?
(
{
item
.
completion_transaction_hash
?
(
<
TxEntityL1
<
TxEntityL1
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
hash=
{
item
.
completion_transaction_hash
}
hash=
{
item
.
completion_transaction_hash
}
truncation=
"constant_long"
truncation=
"constant_long"
noIcon
noIcon
fontSize=
"sm"
lineHeight=
{
5
}
/>
/>
)
:
(
)
:
(
<
chakra
.
span
color=
"text_secondary"
>
<
chakra
.
span
color=
"text_secondary"
>
Pending Claim
Pending Claim
</
chakra
.
span
>
</
chakra
.
span
>
)
}
)
}
</
T
d
>
</
T
ableCell
>
<
T
d
verticalAlign=
"middle"
isNumeric
>
<
T
ableCell
verticalAlign=
"middle"
isNumeric
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
Skeleton
loading=
{
isLoading
}
display=
"inline-block"
>
<
span
>
{
valueStr
}
</
span
>
<
span
>
{
valueStr
}
</
span
>
</
Skeleton
>
</
Skeleton
>
</
T
d
>
</
T
ableCell
>
</
T
r
>
</
T
ableRow
>
);
);
};
};
...
...
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