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
f2a7a152
Commit
f2a7a152
authored
Feb 13, 2024
by
tom
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of github.com:blockscout/frontend into marketplace-admin-api
parents
1ee81f5b
0349c453
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
5 additions
and
32 deletions
+5
-32
txnBatches.ts
mocks/l2txnBatches/txnBatches.ts
+0
-3
L2.ts
stubs/L2.ts
+0
-1
optimisticL2.ts
types/api/optimisticL2.ts
+0
-1
useAddressCountersQuery.ts
ui/address/utils/useAddressCountersQuery.ts
+5
-1
OptimisticL2TxnBatches.pw.tsx_default_base-view-mobile-1.png
...imisticL2TxnBatches.pw.tsx_default_base-view-mobile-1.png
+0
-0
OptimisticL2TxnBatches.pw.tsx_mobile_base-view-mobile-1.png
...timisticL2TxnBatches.pw.tsx_mobile_base-view-mobile-1.png
+0
-0
OptimisticL2TxnBatchesListItem.tsx
...xnBatches/optimisticL2/OptimisticL2TxnBatchesListItem.tsx
+0
-13
OptimisticL2TxnBatchesTable.tsx
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesTable.tsx
+0
-1
OptimisticL2TxnBatchesTableItem.tsx
...nBatches/optimisticL2/OptimisticL2TxnBatchesTableItem.tsx
+0
-12
No files found.
mocks/l2txnBatches/txnBatches.ts
View file @
f2a7a152
export
const
txnBatchesData
=
{
export
const
txnBatchesData
=
{
items
:
[
items
:
[
{
{
epoch_number
:
8547349
,
l1_tx_hashes
:
[
l1_tx_hashes
:
[
'
0x5bc94d02b65743dfaa9e10a2d6e175aff2a05cce2128c8eaf848bd84ab9325c5
'
,
'
0x5bc94d02b65743dfaa9e10a2d6e175aff2a05cce2128c8eaf848bd84ab9325c5
'
,
'
0x92a51bc623111dbb91f243e3452e60fab6f090710357f9d9b75ac8a0f67dfd9d
'
,
'
0x92a51bc623111dbb91f243e3452e60fab6f090710357f9d9b75ac8a0f67dfd9d
'
,
...
@@ -11,7 +10,6 @@ export const txnBatchesData = {
...
@@ -11,7 +10,6 @@ export const txnBatchesData = {
tx_count
:
0
,
tx_count
:
0
,
},
},
{
{
epoch_number
:
8547348
,
l1_tx_hashes
:
[
l1_tx_hashes
:
[
'
0xc45f846ee28ce9ba116ce2d378d3dd00b55d324b833b3ecd4241c919c572c4aa
'
,
'
0xc45f846ee28ce9ba116ce2d378d3dd00b55d324b833b3ecd4241c919c572c4aa
'
,
],
],
...
@@ -20,7 +18,6 @@ export const txnBatchesData = {
...
@@ -20,7 +18,6 @@ export const txnBatchesData = {
tx_count
:
0
,
tx_count
:
0
,
},
},
{
{
epoch_number
:
8547348
,
l1_tx_hashes
:
[
l1_tx_hashes
:
[
'
0x48139721f792d3a68c3781b4cf50e66e8fc7dbb38adff778e09066ea5be9adb8
'
,
'
0x48139721f792d3a68c3781b4cf50e66e8fc7dbb38adff778e09066ea5be9adb8
'
,
],
],
...
...
stubs/L2.ts
View file @
f2a7a152
...
@@ -29,7 +29,6 @@ export const L2_WITHDRAWAL_ITEM: OptimisticL2WithdrawalsItem = {
...
@@ -29,7 +29,6 @@ export const L2_WITHDRAWAL_ITEM: OptimisticL2WithdrawalsItem = {
};
};
export
const
L2_TXN_BATCHES_ITEM
:
OptimisticL2TxnBatchesItem
=
{
export
const
L2_TXN_BATCHES_ITEM
:
OptimisticL2TxnBatchesItem
=
{
epoch_number
:
9103513
,
l1_timestamp
:
'
2023-06-01T14:46:48.000000Z
'
,
l1_timestamp
:
'
2023-06-01T14:46:48.000000Z
'
,
l1_tx_hashes
:
[
l1_tx_hashes
:
[
TX_HASH
,
TX_HASH
,
...
...
types/api/optimisticL2.ts
View file @
f2a7a152
...
@@ -36,7 +36,6 @@ export type OptimisticL2OutputRootsResponse = {
...
@@ -36,7 +36,6 @@ export type OptimisticL2OutputRootsResponse = {
}
}
export
type
OptimisticL2TxnBatchesItem
=
{
export
type
OptimisticL2TxnBatchesItem
=
{
epoch_number
:
number
;
l1_tx_hashes
:
Array
<
string
>
;
l1_tx_hashes
:
Array
<
string
>
;
l1_timestamp
:
string
;
l1_timestamp
:
string
;
l2_block_number
:
number
;
l2_block_number
:
number
;
...
...
ui/address/utils/useAddressCountersQuery.ts
View file @
f2a7a152
...
@@ -39,6 +39,10 @@ export default function useAddressQuery({ hash, addressQuery }: Params): Address
...
@@ -39,6 +39,10 @@ export default function useAddressQuery({ hash, addressQuery }: Params): Address
const
rpcQuery
=
useQuery
<
RpcResponseType
,
unknown
,
AddressCounters
|
null
>
({
const
rpcQuery
=
useQuery
<
RpcResponseType
,
unknown
,
AddressCounters
|
null
>
({
queryKey
:
[
'
RPC
'
,
'
address_counters
'
,
{
hash
}
],
queryKey
:
[
'
RPC
'
,
'
address_counters
'
,
{
hash
}
],
queryFn
:
async
()
=>
{
queryFn
:
async
()
=>
{
if
(
!
publicClient
)
{
throw
new
Error
(
'
No public RPC client
'
);
}
const
txCount
=
publicClient
.
getTransactionCount
({
address
:
hash
as
`0x
${
string
}
`
}).
catch
(()
=>
null
);
const
txCount
=
publicClient
.
getTransactionCount
({
address
:
hash
as
`0x
${
string
}
`
}).
catch
(()
=>
null
);
return
Promise
.
all
([
return
Promise
.
all
([
...
@@ -60,7 +64,7 @@ export default function useAddressQuery({ hash, addressQuery }: Params): Address
...
@@ -60,7 +64,7 @@ export default function useAddressQuery({ hash, addressQuery }: Params): Address
refetchOnMount
:
false
,
refetchOnMount
:
false
,
});
});
const
isRpcQuery
=
Boolean
((
addressQuery
.
isDegradedData
||
apiQuery
.
isError
)
&&
rpcQuery
.
data
);
const
isRpcQuery
=
Boolean
((
addressQuery
.
isDegradedData
||
apiQuery
.
isError
)
&&
rpcQuery
.
data
&&
publicClient
);
const
query
=
isRpcQuery
?
rpcQuery
as
UseQueryResult
<
AddressCounters
,
ResourceError
<
{
status
:
number
}
>>
:
apiQuery
;
const
query
=
isRpcQuery
?
rpcQuery
as
UseQueryResult
<
AddressCounters
,
ResourceError
<
{
status
:
number
}
>>
:
apiQuery
;
return
{
return
{
...
...
ui/pages/__screenshots__/OptimisticL2TxnBatches.pw.tsx_default_base-view-mobile-1.png
View replaced file @
1ee81f5b
View file @
f2a7a152
43.9 KB
|
W:
|
H:
41.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/pages/__screenshots__/OptimisticL2TxnBatches.pw.tsx_mobile_base-view-mobile-1.png
View replaced file @
1ee81f5b
View file @
f2a7a152
60.2 KB
|
W:
|
H:
51.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesListItem.tsx
View file @
f2a7a152
...
@@ -7,7 +7,6 @@ import { route } from 'nextjs-routes';
...
@@ -7,7 +7,6 @@ import { route } from 'nextjs-routes';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
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
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
...
@@ -50,18 +49,6 @@ const OptimisticL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
...
@@ -50,18 +49,6 @@ const OptimisticL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
</
LinkInternal
>
</
LinkInternal
>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Epoch number
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
BlockEntityL1
isLoading=
{
isLoading
}
number=
{
item
.
epoch_number
}
noIcon
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
/>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
L1 txn hash
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
L1 txn hash
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
py=
"3px"
>
<
ListItemMobileGrid
.
Value
py=
"3px"
>
<
VStack
spacing=
{
3
}
w=
"100%"
overflow=
"hidden"
alignItems=
"flex-start"
>
<
VStack
spacing=
{
3
}
w=
"100%"
overflow=
"hidden"
alignItems=
"flex-start"
>
...
...
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesTable.tsx
View file @
f2a7a152
...
@@ -20,7 +20,6 @@ const OptimisticL2TxnBatchesTable = ({ items, top, isLoading }: Props) => {
...
@@ -20,7 +20,6 @@ const OptimisticL2TxnBatchesTable = ({ items, top, isLoading }: Props) => {
<
Tr
>
<
Tr
>
<
Th
width=
"170px"
>
L2 block #
</
Th
>
<
Th
width=
"170px"
>
L2 block #
</
Th
>
<
Th
width=
"170px"
>
L2 block txn count
</
Th
>
<
Th
width=
"170px"
>
L2 block txn count
</
Th
>
<
Th
width=
"160px"
>
Epoch number
</
Th
>
<
Th
width=
"100%"
>
L1 txn hash
</
Th
>
<
Th
width=
"100%"
>
L1 txn hash
</
Th
>
<
Th
width=
"150px"
>
Age
</
Th
>
<
Th
width=
"150px"
>
Age
</
Th
>
</
Tr
>
</
Tr
>
...
...
ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesTableItem.tsx
View file @
f2a7a152
...
@@ -7,7 +7,6 @@ import { route } from 'nextjs-routes';
...
@@ -7,7 +7,6 @@ import { route } from 'nextjs-routes';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
BlockEntityL1
from
'
ui/shared/entities/block/BlockEntityL1
'
;
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
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
...
@@ -45,17 +44,6 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => {
...
@@ -45,17 +44,6 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => {
</
Skeleton
>
</
Skeleton
>
</
LinkInternal
>
</
LinkInternal
>
</
Td
>
</
Td
>
<
Td
>
<
BlockEntityL1
isLoading=
{
isLoading
}
number=
{
item
.
epoch_number
}
fontSize=
"sm"
lineHeight=
{
5
}
fontWeight=
{
600
}
py=
"2px"
noIcon
/>
</
Td
>
<
Td
pr=
{
12
}
>
<
Td
pr=
{
12
}
>
<
VStack
spacing=
{
3
}
alignItems=
"flex-start"
>
<
VStack
spacing=
{
3
}
alignItems=
"flex-start"
>
{
item
.
l1_tx_hashes
.
map
(
hash
=>
(
{
item
.
l1_tx_hashes
.
map
(
hash
=>
(
...
...
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