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
4731cb8e
Commit
4731cb8e
authored
Apr 12, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tx l2 fields
parent
4908184b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
transaction.ts
types/api/transaction.ts
+4
-0
TxDetails.tsx
ui/tx/TxDetails.tsx
+42
-0
No files found.
types/api/transaction.ts
View file @
4731cb8e
...
@@ -50,6 +50,10 @@ export type Transaction = (
...
@@ -50,6 +50,10 @@ export type Transaction = (
tx_types
:
Array
<
TransactionType
>
;
tx_types
:
Array
<
TransactionType
>
;
tx_tag
:
string
|
null
;
tx_tag
:
string
|
null
;
actions
:
Array
<
TxAction
>
;
actions
:
Array
<
TxAction
>
;
l1_fee
?:
string
;
l1_fee_scalar
?:
string
;
l1_gas_price
?:
string
;
l1_gas_used
?:
string
;
}
}
export
type
TransactionsResponse
=
TransactionsResponseValidated
|
TransactionsResponsePending
;
export
type
TransactionsResponse
=
TransactionsResponseValidated
|
TransactionsResponsePending
;
...
...
ui/tx/TxDetails.tsx
View file @
4731cb8e
...
@@ -318,6 +318,48 @@ const TxDetails = () => {
...
@@ -318,6 +318,48 @@ const TxDetails = () => {
/>
/>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
)
}
)
}
{
appConfig
.
L2
.
isL2Network
&&
(
<>
{
data
.
l1_gas_used
&&
(
<
DetailsInfoItem
title=
"L1 gas used by txn"
hint=
"L1 gas used by transaction"
>
<
Text
>
{
BigNumber
(
data
.
l1_gas_used
).
toFormat
()
}
</
Text
>
</
DetailsInfoItem
>
)
}
{
data
.
l1_gas_price
&&
(
<
DetailsInfoItem
title=
"L1 gas price"
hint=
"L1 gas price"
>
<
Text
mr=
{
1
}
>
{
BigNumber
(
data
.
l1_gas_price
).
dividedBy
(
WEI
).
toFixed
()
}
{
appConfig
.
network
.
currency
.
symbol
}
</
Text
>
<
Text
variant=
"secondary"
>
(
{
BigNumber
(
data
.
l1_gas_price
).
dividedBy
(
WEI_IN_GWEI
).
toFixed
()
}
Gwei)
</
Text
>
</
DetailsInfoItem
>
)
}
{
data
.
l1_fee
&&
(
<
DetailsInfoItem
title=
"L1 fee"
hint=
"L1 fee"
>
<
CurrencyValue
value=
{
data
.
l1_fee
}
currency=
{
appConfig
.
network
.
currency
.
symbol
}
exchangeRate=
{
data
.
exchange_rate
}
flexWrap=
"wrap"
/>
</
DetailsInfoItem
>
)
}
{
data
.
l1_fee_scalar
&&
(
<
DetailsInfoItem
title=
"L1 fee scalar"
hint=
"L1 fee scalar"
>
<
Text
>
{
data
.
l1_fee_scalar
}
</
Text
>
</
DetailsInfoItem
>
)
}
</>
)
}
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
>
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
>
<
Element
name=
"TxDetails__cutLink"
>
<
Element
name=
"TxDetails__cutLink"
>
<
Link
<
Link
...
...
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