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
91b8e7bf
Commit
91b8e7bf
authored
Jan 17, 2024
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide fee if hidden in config
parent
37cbe817
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
40 deletions
+50
-40
UserOpDetails.tsx
ui/userOp/UserOpDetails.tsx
+33
-29
UserOpsListItem.tsx
ui/userOps/UserOpsListItem.tsx
+10
-6
UserOpsTable.tsx
ui/userOps/UserOpsTable.tsx
+1
-2
UserOpsTableItem.tsx
ui/userOps/UserOpsTableItem.tsx
+6
-3
No files found.
ui/userOp/UserOpDetails.tsx
View file @
91b8e7bf
...
...
@@ -104,18 +104,19 @@ const UserOpDetails = ({ query }: Props) => {
<
DetailsTimestamp
timestamp=
{
Number
(
data
.
timestamp
)
*
1000
}
isLoading=
{
isPlaceholderData
}
/>
</
DetailsInfoItem
>
)
}
{
/* condition? */
}
<
DetailsInfoItem
title=
"Fee"
hint=
"Total User operation fee"
isLoading=
{
isPlaceholderData
}
>
<
CurrencyValue
value=
{
data
.
fee
}
currency=
{
config
.
chain
.
currency
.
symbol
}
{
!
config
.
UI
.
views
.
tx
.
hiddenFields
?.
tx_fee
&&
(
<
DetailsInfoItem
title=
"Fee"
hint=
"Total User operation fee"
isLoading=
{
isPlaceholderData
}
/>
</
DetailsInfoItem
>
>
<
CurrencyValue
value=
{
data
.
fee
}
currency=
{
config
.
chain
.
currency
.
symbol
}
isLoading=
{
isPlaceholderData
}
/>
</
DetailsInfoItem
>
)
}
<
DetailsInfoItem
title=
"Gas limit"
hint=
"Gas limit for the User operation"
...
...
@@ -183,24 +184,27 @@ const UserOpDetails = ({ query }: Props) => {
>
{
BigNumber
(
data
.
pre_verification_gas
).
toFormat
()
}
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
"Max fee per gas"
hint=
"Maximum fee per gas "
>
<
Text
>
{
BigNumber
(
data
.
max_fee_per_gas
).
dividedBy
(
WEI
).
toFixed
()
}
{
config
.
chain
.
currency
.
symbol
}
</
Text
>
<
Text
variant=
"secondary"
whiteSpace=
"pre"
>
{
space
}
(
{
BigNumber
(
data
.
max_fee_per_gas
).
dividedBy
(
WEI_IN_GWEI
).
toFixed
()
}
Gwei)
</
Text
>
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
"Max priority fee per gas"
hint=
"Maximum priority fee per gas"
>
<
Text
>
{
BigNumber
(
data
.
max_priority_fee_per_gas
).
dividedBy
(
WEI
).
toFixed
()
}
{
config
.
chain
.
currency
.
symbol
}
</
Text
>
<
Text
variant=
"secondary"
whiteSpace=
"pre"
>
{
space
}
(
{
BigNumber
(
data
.
max_priority_fee_per_gas
).
dividedBy
(
WEI_IN_GWEI
).
toFixed
()
}
Gwei)
</
Text
>
</
DetailsInfoItem
>
{
!
config
.
UI
.
views
.
tx
.
hiddenFields
?.
gas_fees
&&
(
<>
<
DetailsInfoItem
title=
"Max fee per gas"
hint=
"Maximum fee per gas "
>
<
Text
>
{
BigNumber
(
data
.
max_fee_per_gas
).
dividedBy
(
WEI
).
toFixed
()
}
{
config
.
chain
.
currency
.
symbol
}
</
Text
>
<
Text
variant=
"secondary"
whiteSpace=
"pre"
>
{
space
}
(
{
BigNumber
(
data
.
max_fee_per_gas
).
dividedBy
(
WEI_IN_GWEI
).
toFixed
()
}
Gwei)
</
Text
>
</
DetailsInfoItem
><
DetailsInfoItem
title=
"Max priority fee per gas"
hint=
"Maximum priority fee per gas"
>
<
Text
>
{
BigNumber
(
data
.
max_priority_fee_per_gas
).
dividedBy
(
WEI
).
toFixed
()
}
{
config
.
chain
.
currency
.
symbol
}
</
Text
>
<
Text
variant=
"secondary"
whiteSpace=
"pre"
>
{
space
}
(
{
BigNumber
(
data
.
max_priority_fee_per_gas
).
dividedBy
(
WEI_IN_GWEI
).
toFixed
()
}
Gwei)
</
Text
>
</
DetailsInfoItem
>
</>
)
}
<
DetailsInfoItemDivider
/>
...
...
ui/userOps/UserOpsListItem.tsx
View file @
91b8e7bf
...
...
@@ -68,12 +68,16 @@ const UserOpsListItem = ({ item, isLoading }: Props) => {
/>
</
ListItemMobileGrid
.
Value
>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Fee
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
CurrencyValue
value=
{
item
.
fee
}
isLoading=
{
isLoading
}
accuracy=
{
8
}
currency=
{
config
.
chain
.
currency
.
symbol
}
/>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
{
!
config
.
UI
.
views
.
tx
.
hiddenFields
?.
tx_fee
&&
(
<>
<
ListItemMobileGrid
.
Label
isLoading=
{
isLoading
}
>
Fee
</
ListItemMobileGrid
.
Label
>
<
ListItemMobileGrid
.
Value
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
CurrencyValue
value=
{
item
.
fee
}
isLoading=
{
isLoading
}
accuracy=
{
8
}
currency=
{
config
.
chain
.
currency
.
symbol
}
/>
</
Skeleton
>
</
ListItemMobileGrid
.
Value
>
</>
)
}
</
ListItemMobileGrid
.
Container
>
);
...
...
ui/userOps/UserOpsTable.tsx
View file @
91b8e7bf
...
...
@@ -25,8 +25,7 @@ const UserOpsTable = ({ items, isLoading, top }: Props) => {
<
Th
w=
"160px"
>
Sender
</
Th
>
<
Th
w=
"160px"
>
Tx hash
</
Th
>
<
Th
w=
"40%"
>
Block
</
Th
>
{
/* add condition like in tx table */
}
<
Th
w=
"120px"
isNumeric
>
{
`Fee ${ config.chain.currency.symbol }`
}
</
Th
>
{
!
config
.
UI
.
views
.
tx
.
hiddenFields
?.
tx_fee
&&
<
Th
w=
"120px"
isNumeric
>
{
`Fee ${ config.chain.currency.symbol }`
}
</
Th
>
}
</
Tr
>
</
Thead
>
<
Tbody
>
...
...
ui/userOps/UserOpsTableItem.tsx
View file @
91b8e7bf
...
...
@@ -3,6 +3,7 @@ import React from 'react';
import
type
{
UserOpsItem
}
from
'
types/api/userOps
'
;
import
config
from
'
configs/app
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
CurrencyValue
from
'
ui/shared/CurrencyValue
'
;
import
BlockEntity
from
'
ui/shared/entities/block/BlockEntity
'
;
...
...
@@ -55,9 +56,11 @@ const WithdrawalsTableItem = ({ item, isLoading }: Props) => {
noIcon
/>
</
Td
>
<
Td
verticalAlign=
"middle"
isNumeric
>
<
CurrencyValue
value=
{
item
.
fee
}
isLoading=
{
isLoading
}
accuracy=
{
8
}
/>
</
Td
>
{
!
config
.
UI
.
views
.
tx
.
hiddenFields
?.
tx_fee
&&
(
<
Td
verticalAlign=
"middle"
isNumeric
>
<
CurrencyValue
value=
{
item
.
fee
}
isLoading=
{
isLoading
}
accuracy=
{
8
}
/>
</
Td
>
)
}
</
Tr
>
);
};
...
...
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