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
b3f5a0b5
Commit
b3f5a0b5
authored
Mar 07, 2024
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle undefined timestamp for zkEVM batch
Fixes #1674
parent
a5a42116
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
zkEvmL2.ts
types/api/zkEvmL2.ts
+2
-2
ZkEvmL2TxnBatchDetails.tsx
ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx
+2
-2
ZkEvmTxnBatchesListItem.tsx
ui/txnBatches/zkEvmL2/ZkEvmTxnBatchesListItem.tsx
+1
-1
ZkEvmTxnBatchesTableItem.tsx
ui/txnBatches/zkEvmL2/ZkEvmTxnBatchesTableItem.tsx
+1
-1
No files found.
types/api/zkEvmL2.ts
View file @
b3f5a0b5
...
@@ -5,7 +5,7 @@ export type ZkEvmL2TxnBatchesItem = {
...
@@ -5,7 +5,7 @@ export type ZkEvmL2TxnBatchesItem = {
verify_tx_hash
:
string
|
null
;
verify_tx_hash
:
string
|
null
;
sequence_tx_hash
:
string
|
null
;
sequence_tx_hash
:
string
|
null
;
status
:
string
;
status
:
string
;
timestamp
:
string
;
timestamp
:
string
|
null
;
tx_count
:
number
;
tx_count
:
number
;
}
}
...
@@ -26,7 +26,7 @@ export type ZkEvmL2TxnBatch = {
...
@@ -26,7 +26,7 @@ export type ZkEvmL2TxnBatch = {
sequence_tx_hash
:
string
;
sequence_tx_hash
:
string
;
state_root
:
string
;
state_root
:
string
;
status
:
typeof
ZKEVM_L2_TX_BATCH_STATUSES
[
number
];
status
:
typeof
ZKEVM_L2_TX_BATCH_STATUSES
[
number
];
timestamp
:
string
;
timestamp
:
string
|
null
;
transactions
:
Array
<
string
>
;
transactions
:
Array
<
string
>
;
verify_tx_hash
:
string
;
verify_tx_hash
:
string
;
}
}
...
...
ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx
View file @
b3f5a0b5
...
@@ -86,7 +86,7 @@ const ZkEvmL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -86,7 +86,7 @@ const ZkEvmL2TxnBatchDetails = ({ query }: Props) => {
title=
"Timestamp"
title=
"Timestamp"
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
>
>
<
DetailsTimestamp
timestamp=
{
data
.
timestamp
}
isLoading=
{
isPlaceholderData
}
/>
{
data
.
timestamp
?
<
DetailsTimestamp
timestamp=
{
data
.
timestamp
}
isLoading=
{
isPlaceholderData
}
/>
:
'
Undefined
'
}
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Verify tx hash"
title=
"Verify tx hash"
...
@@ -98,7 +98,7 @@ const ZkEvmL2TxnBatchDetails = ({ query }: Props) => {
...
@@ -98,7 +98,7 @@ const ZkEvmL2TxnBatchDetails = ({ query }: Props) => {
hash=
{
data
.
verify_tx_hash
}
hash=
{
data
.
verify_tx_hash
}
maxW=
"100%"
maxW=
"100%"
/>
/>
)
:
<
Text
>
p
ending
</
Text
>
}
)
:
<
Text
>
P
ending
</
Text
>
}
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Transactions"
title=
"Transactions"
...
...
ui/txnBatches/zkEvmL2/ZkEvmTxnBatchesListItem.tsx
View file @
b3f5a0b5
...
@@ -18,7 +18,7 @@ const rollupFeature = config.features.rollup;
...
@@ -18,7 +18,7 @@ const rollupFeature = config.features.rollup;
type
Props
=
{
item
:
ZkEvmL2TxnBatchesItem
;
isLoading
?:
boolean
};
type
Props
=
{
item
:
ZkEvmL2TxnBatchesItem
;
isLoading
?:
boolean
};
const
ZkEvmTxnBatchesListItem
=
({
item
,
isLoading
}:
Props
)
=>
{
const
ZkEvmTxnBatchesListItem
=
({
item
,
isLoading
}:
Props
)
=>
{
const
timeAgo
=
dayjs
(
item
.
timestamp
).
fromNow
()
;
const
timeAgo
=
item
.
timestamp
?
dayjs
(
item
.
timestamp
).
fromNow
()
:
'
Undefined
'
;
if
(
!
rollupFeature
.
isEnabled
||
rollupFeature
.
type
!==
'
zkEvm
'
)
{
if
(
!
rollupFeature
.
isEnabled
||
rollupFeature
.
type
!==
'
zkEvm
'
)
{
return
null
;
return
null
;
...
...
ui/txnBatches/zkEvmL2/ZkEvmTxnBatchesTableItem.tsx
View file @
b3f5a0b5
...
@@ -17,7 +17,7 @@ const rollupFeature = config.features.rollup;
...
@@ -17,7 +17,7 @@ const rollupFeature = config.features.rollup;
type
Props
=
{
item
:
ZkEvmL2TxnBatchesItem
;
isLoading
?:
boolean
};
type
Props
=
{
item
:
ZkEvmL2TxnBatchesItem
;
isLoading
?:
boolean
};
const
TxnBatchesTableItem
=
({
item
,
isLoading
}:
Props
)
=>
{
const
TxnBatchesTableItem
=
({
item
,
isLoading
}:
Props
)
=>
{
const
timeAgo
=
dayjs
(
item
.
timestamp
).
fromNow
()
;
const
timeAgo
=
item
.
timestamp
?
dayjs
(
item
.
timestamp
).
fromNow
()
:
'
Undefined
'
;
if
(
!
rollupFeature
.
isEnabled
||
rollupFeature
.
type
!==
'
zkEvm
'
)
{
if
(
!
rollupFeature
.
isEnabled
||
rollupFeature
.
type
!==
'
zkEvm
'
)
{
return
null
;
return
null
;
...
...
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