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
9c91fd25
Commit
9c91fd25
authored
Nov 16, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OP Withdrawals on transaction page
Fixes #1355
parent
12967209
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
24 deletions
+30
-24
transaction.ts
types/api/transaction.ts
+7
-2
TxDetails.tsx
ui/tx/TxDetails.tsx
+16
-4
TxDetailsWithdrawalStatus.tsx
ui/tx/details/TxDetailsWithdrawalStatus.tsx
+7
-18
No files found.
types/api/transaction.ts
View file @
9c91fd25
...
@@ -14,6 +14,12 @@ export type TransactionRevertReason = {
...
@@ -14,6 +14,12 @@ export type TransactionRevertReason = {
type
WrappedTransactionFields
=
'
decoded_input
'
|
'
fee
'
|
'
gas_limit
'
|
'
gas_price
'
|
'
hash
'
|
'
max_fee_per_gas
'
|
type
WrappedTransactionFields
=
'
decoded_input
'
|
'
fee
'
|
'
gas_limit
'
|
'
gas_price
'
|
'
hash
'
|
'
max_fee_per_gas
'
|
'
max_priority_fee_per_gas
'
|
'
method
'
|
'
nonce
'
|
'
raw_input
'
|
'
to
'
|
'
type
'
|
'
value
'
;
'
max_priority_fee_per_gas
'
|
'
method
'
|
'
nonce
'
|
'
raw_input
'
|
'
to
'
|
'
type
'
|
'
value
'
;
export
interface
OpWithdrawal
{
l1_transaction_hash
:
string
;
nonce
:
number
;
status
:
L2WithdrawalStatus
;
}
export
type
Transaction
=
{
export
type
Transaction
=
{
to
:
AddressParam
|
null
;
to
:
AddressParam
|
null
;
created_contract
:
AddressParam
|
null
;
created_contract
:
AddressParam
|
null
;
...
@@ -54,8 +60,7 @@ export type Transaction = {
...
@@ -54,8 +60,7 @@ export type Transaction = {
l1_gas_used
?:
string
;
l1_gas_used
?:
string
;
has_error_in_internal_txs
:
boolean
|
null
;
has_error_in_internal_txs
:
boolean
|
null
;
// optimism fields
// optimism fields
op_withdrawal_status
?:
L2WithdrawalStatus
;
op_withdrawals
?:
Array
<
OpWithdrawal
>
;
op_l1_transaction_hash
?:
string
;
// SUAVE fields
// SUAVE fields
execution_node
?:
AddressParam
|
null
;
execution_node
?:
AddressParam
|
null
;
allowed_peekers
?:
Array
<
string
>
;
allowed_peekers
?:
Array
<
string
>
;
...
...
ui/tx/TxDetails.tsx
View file @
9c91fd25
...
@@ -157,10 +157,22 @@ const TxDetails = () => {
...
@@ -157,10 +157,22 @@ const TxDetails = () => {
</
Tag
>
</
Tag
>
)
}
)
}
</
DetailsInfoItem
>
</
DetailsInfoItem
>
{
config
.
features
.
optimisticRollup
.
isEnabled
&&
data
.
op_withdrawals
&&
data
.
op_withdrawals
.
length
>
0
&&
(
<
DetailsInfoItem
title=
"Withdrawal status"
hint=
"Detailed status progress of the transaction"
>
<
Flex
flexDir=
"column"
rowGap=
{
3
}
>
{
data
.
op_withdrawals
.
map
((
withdrawal
)
=>
(
<
TxDetailsWithdrawalStatus
<
TxDetailsWithdrawalStatus
status=
{
data
.
op_withdrawal_status
}
key=
{
withdrawal
.
nonce
}
l1TxHash=
{
data
.
op_l1_transaction_hash
}
status=
{
withdrawal
.
status
}
l1TxHash=
{
withdrawal
.
l1_transaction_hash
}
/>
/>
))
}
</
Flex
>
</
DetailsInfoItem
>
)
}
{
data
.
zkevm_status
&&
(
{
data
.
zkevm_status
&&
(
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Confirmation status"
title=
"Confirmation status"
...
...
ui/tx/details/TxDetailsWithdrawalStatus.tsx
View file @
9c91fd25
...
@@ -4,8 +4,6 @@ import React from 'react';
...
@@ -4,8 +4,6 @@ import React from 'react';
import
type
{
L2WithdrawalStatus
}
from
'
types/api/l2Withdrawals
'
;
import
type
{
L2WithdrawalStatus
}
from
'
types/api/l2Withdrawals
'
;
import
{
WITHDRAWAL_STATUSES
}
from
'
types/api/l2Withdrawals
'
;
import
{
WITHDRAWAL_STATUSES
}
from
'
types/api/l2Withdrawals
'
;
import
config
from
'
configs/app
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
TxEntityL1
from
'
ui/shared/entities/tx/TxEntityL1
'
;
import
VerificationSteps
from
'
ui/shared/verificationSteps/VerificationSteps
'
;
import
VerificationSteps
from
'
ui/shared/verificationSteps/VerificationSteps
'
;
...
@@ -15,10 +13,6 @@ interface Props {
...
@@ -15,10 +13,6 @@ interface Props {
}
}
const
TxDetailsWithdrawalStatus
=
({
status
,
l1TxHash
}:
Props
)
=>
{
const
TxDetailsWithdrawalStatus
=
({
status
,
l1TxHash
}:
Props
)
=>
{
if
(
!
config
.
features
.
optimisticRollup
.
isEnabled
)
{
return
null
;
}
if
(
!
status
||
!
WITHDRAWAL_STATUSES
.
includes
(
status
))
{
if
(
!
status
||
!
WITHDRAWAL_STATUSES
.
includes
(
status
))
{
return
null
;
return
null
;
}
}
...
@@ -60,10 +54,6 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
...
@@ -60,10 +54,6 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
)
:
null
;
)
:
null
;
return
(
return
(
<
DetailsInfoItem
title=
"Withdrawal status"
hint=
"Detailed status progress of the transaction"
>
<
VerificationSteps
<
VerificationSteps
steps=
{
steps
as
unknown
as
Array
<
L2WithdrawalStatus
>
}
steps=
{
steps
as
unknown
as
Array
<
L2WithdrawalStatus
>
}
currentStep=
{
status
}
currentStep=
{
status
}
...
@@ -71,7 +61,6 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
...
@@ -71,7 +61,6 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
my=
{
hasClaimButton
?
'
-6px
'
:
0
}
my=
{
hasClaimButton
?
'
-6px
'
:
0
}
lineHeight=
{
hasClaimButton
?
8
:
undefined
}
lineHeight=
{
hasClaimButton
?
8
:
undefined
}
/>
/>
</
DetailsInfoItem
>
);
);
};
};
...
...
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