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
4bf9bf5a
Commit
4bf9bf5a
authored
Feb 13, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
withdrawals, logs and user ops tabs on address page
parent
a51725d0
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
66 additions
and
58 deletions
+66
-58
RoutedTabs.tsx
toolkit/components/RoutedTabs/RoutedTabs.tsx
+1
-1
AddressLogs.tsx
ui/address/AddressLogs.tsx
+4
-3
AddressTokenTransfers.tsx
ui/address/AddressTokenTransfers.tsx
+9
-8
AddressWithdrawals.tsx
ui/address/AddressWithdrawals.tsx
+9
-8
Address.tsx
ui/pages/Address.tsx
+30
-30
HashStringShortenDynamic.tsx
ui/shared/HashStringShortenDynamic.tsx
+1
-0
SocketAlert.tsx
ui/shared/SocketAlert.tsx
+4
-1
LogDecodedInputDataHeader.tsx
ui/shared/logs/LogDecodedInputDataHeader.tsx
+1
-1
LogIndex.tsx
ui/shared/logs/LogIndex.tsx
+3
-2
LogItem.tsx
ui/shared/logs/LogItem.tsx
+2
-0
BeaconChainWithdrawalsListItem.tsx
...ithdrawals/beaconChain/BeaconChainWithdrawalsListItem.tsx
+1
-2
BeaconChainWithdrawalsTableItem.tsx
...thdrawals/beaconChain/BeaconChainWithdrawalsTableItem.tsx
+1
-2
No files found.
toolkit/components/RoutedTabs/RoutedTabs.tsx
View file @
4bf9bf5a
...
@@ -55,7 +55,7 @@ const RoutedTabs = (props: Props) => {
...
@@ -55,7 +55,7 @@ const RoutedTabs = (props: Props) => {
{
...
rest
}
{
...
rest
}
tabs=
{
tabs
}
tabs=
{
tabs
}
onValueChange=
{
handleValueChange
}
onValueChange=
{
handleValueChange
}
defaultValue=
{
activeTab
?
getTabValue
(
activeTab
)
:
undefined
}
defaultValue=
{
activeTab
?
getTabValue
(
activeTab
)
:
getTabValue
(
tabs
[
0
])
}
/>
/>
);
);
};
};
...
...
ui/address/AddressLogs.tsx
View file @
4bf9bf5a
...
@@ -70,11 +70,12 @@ const AddressLogs = ({ scrollRef, shouldRender = true, isQueryEnabled = true }:
...
@@ -70,11 +70,12 @@ const AddressLogs = ({ scrollRef, shouldRender = true, isQueryEnabled = true }:
return
(
return
(
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no logs for this address."
emptyText=
"There are no logs for this address."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
);
);
};
};
...
...
ui/address/AddressTokenTransfers.tsx
View file @
4bf9bf5a
import
{
Flex
,
Hide
,
Show
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
{
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -201,7 +201,7 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shou
...
@@ -201,7 +201,7 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shou
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
TokenTransferTable
<
TokenTransferTable
data=
{
data
?.
items
}
data=
{
data
?.
items
}
baseAddress=
{
currentAddress
}
baseAddress=
{
currentAddress
}
...
@@ -213,8 +213,8 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shou
...
@@ -213,8 +213,8 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shou
socketInfoNum=
{
newItemsCount
}
socketInfoNum=
{
newItemsCount
}
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
</
Hide
>
</
Box
>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
pagination
.
page
===
1
&&
!
tokenFilter
&&
(
{
pagination
.
page
===
1
&&
!
tokenFilter
&&
(
<
SocketNewItemsNotice
.
Mobile
<
SocketNewItemsNotice
.
Mobile
url=
{
window
.
location
.
href
}
url=
{
window
.
location
.
href
}
...
@@ -231,7 +231,7 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shou
...
@@ -231,7 +231,7 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shou
enableTimeIncrement
enableTimeIncrement
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
</
Show
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -280,15 +280,16 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shou
...
@@ -280,15 +280,16 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shou
return
(
return
(
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no token transfers."
emptyText=
"There are no token transfers."
filterProps=
{
{
filterProps=
{
{
emptyFilteredText
:
`Couldn${ apos }t find any token transfer that matches your query.`
,
emptyFilteredText
:
`Couldn${ apos }t find any token transfer that matches your query.`
,
hasActiveFilters
:
Boolean
(
numActiveFilters
),
hasActiveFilters
:
Boolean
(
numActiveFilters
),
}
}
}
}
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
);
);
};
};
...
...
ui/address/AddressWithdrawals.tsx
View file @
4bf9bf5a
import
{
Show
,
Hide
}
from
'
@chakra-ui/react
'
;
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -43,7 +43,7 @@ const AddressWithdrawals = ({ scrollRef, shouldRender = true, isQueryEnabled = t
...
@@ -43,7 +43,7 @@ const AddressWithdrawals = ({ scrollRef, shouldRender = true, isQueryEnabled = t
const
content
=
data
?.
items
?
(
const
content
=
data
?.
items
?
(
<>
<>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
hideFrom=
"lg"
>
{
data
.
items
.
map
((
item
,
index
)
=>
(
{
data
.
items
.
map
((
item
,
index
)
=>
(
<
BeaconChainWithdrawalsListItem
<
BeaconChainWithdrawalsListItem
key=
{
item
.
index
+
Number
(
isPlaceholderData
?
index
:
''
)
}
key=
{
item
.
index
+
Number
(
isPlaceholderData
?
index
:
''
)
}
...
@@ -52,15 +52,15 @@ const AddressWithdrawals = ({ scrollRef, shouldRender = true, isQueryEnabled = t
...
@@ -52,15 +52,15 @@ const AddressWithdrawals = ({ scrollRef, shouldRender = true, isQueryEnabled = t
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
))
}
))
}
</
Show
>
</
Box
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Box
hideBelow=
"lg"
>
<
BeaconChainWithdrawalsTable
<
BeaconChainWithdrawalsTable
items=
{
data
.
items
}
items=
{
data
.
items
}
view=
"address"
view=
"address"
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
top=
{
pagination
.
isVisible
?
ACTION_BAR_HEIGHT_DESKTOP
:
0
}
isLoading=
{
isPlaceholderData
}
isLoading=
{
isPlaceholderData
}
/>
/>
</
Hide
>
</
Box
>
</>
</>
)
:
null
;
)
:
null
;
...
@@ -73,11 +73,12 @@ const AddressWithdrawals = ({ scrollRef, shouldRender = true, isQueryEnabled = t
...
@@ -73,11 +73,12 @@ const AddressWithdrawals = ({ scrollRef, shouldRender = true, isQueryEnabled = t
return
(
return
(
<
DataListDisplay
<
DataListDisplay
isError=
{
isError
}
isError=
{
isError
}
items
=
{
data
?.
items
}
items
Num=
{
data
?.
items
?.
length
}
emptyText=
"There are no withdrawals for this address."
emptyText=
"There are no withdrawals for this address."
content=
{
content
}
actionBar=
{
actionBar
}
actionBar=
{
actionBar
}
/>
>
{
content
}
</
DataListDisplay
>
);
);
};
};
...
...
ui/pages/Address.tsx
View file @
4bf9bf5a
...
@@ -172,28 +172,28 @@ const AddressPageContent = () => {
...
@@ -172,28 +172,28 @@ const AddressPageContent = () => {
// component: <AddressAccountHistory scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
// component: <AddressAccountHistory scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
// } :
// } :
// undefined,
// undefined,
//
config.features.userOps.isEnabled && Boolean(userOpsAccountQuery.data?.total_ops) ?
config.features.userOps.isEnabled && Boolean(userOpsAccountQuery.data?.total_ops) ?
//
{
{
//
id: 'user_ops',
id: 'user_ops',
//
title: 'User operations',
title: 'User operations',
//
count: userOpsAccountQuery.data?.total_ops,
count: userOpsAccountQuery.data?.total_ops,
//
component: <AddressUserOps shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
component: <AddressUserOps shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
//
} :
} :
//
undefined,
undefined,
//
config.features.beaconChain.isEnabled && addressTabsCountersQuery.data?.withdrawals_count ?
config.features.beaconChain.isEnabled && addressTabsCountersQuery.data?.withdrawals_count ?
//
{
{
//
id: 'withdrawals',
id: 'withdrawals',
//
title: 'Withdrawals',
title: 'Withdrawals',
//
count: addressTabsCountersQuery.data?.withdrawals_count,
count: addressTabsCountersQuery.data?.withdrawals_count,
//
component: <AddressWithdrawals scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
component: <AddressWithdrawals scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
//
} :
} :
//
undefined,
undefined,
//
{
{
//
id: 'token_transfers',
id: 'token_transfers',
//
title: 'Token transfers',
title: 'Token transfers',
//
count: addressTabsCountersQuery.data?.token_transfers_count,
count: addressTabsCountersQuery.data?.token_transfers_count,
//
component: <AddressTokenTransfers scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
component: <AddressTokenTransfers scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
//
},
},
// {
// {
// id: 'tokens',
// id: 'tokens',
// title: 'Tokens',
// title: 'Tokens',
...
@@ -226,14 +226,14 @@ const AddressPageContent = () => {
...
@@ -226,14 +226,14 @@ const AddressPageContent = () => {
component: <AddressBlocksValidated scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
component: <AddressBlocksValidated scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
} :
} :
undefined,
undefined,
//
addressTabsCountersQuery.data?.logs_count ?
addressTabsCountersQuery.data?.logs_count ?
//
{
{
//
id: 'logs',
id: 'logs',
//
title: 'Logs',
title: 'Logs',
//
count: addressTabsCountersQuery.data?.logs_count,
count: addressTabsCountersQuery.data?.logs_count,
//
component: <AddressLogs scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
component: <AddressLogs scrollRef={ tabsScrollRef } shouldRender={ !isTabsLoading } isQueryEnabled={ areQueriesEnabled }/>,
//
} :
} :
//
undefined,
undefined,
// addressQuery.data?.is_contract ? {
// addressQuery.data?.is_contract ? {
// id: 'contract',
// id: 'contract',
...
...
ui/shared/HashStringShortenDynamic.tsx
View file @
4bf9bf5a
...
@@ -28,6 +28,7 @@ interface Props {
...
@@ -28,6 +28,7 @@ interface Props {
as
?:
React
.
ElementType
;
as
?:
React
.
ElementType
;
}
}
// TODO @tom2drum fix truncation when loading
const
HashStringShortenDynamic
=
({
hash
,
fontWeight
=
'
400
'
,
isTooltipDisabled
,
tailLength
=
TAIL_LENGTH
,
as
=
'
span
'
}:
Props
)
=>
{
const
HashStringShortenDynamic
=
({
hash
,
fontWeight
=
'
400
'
,
isTooltipDisabled
,
tailLength
=
TAIL_LENGTH
,
as
=
'
span
'
}:
Props
)
=>
{
const
elementRef
=
useRef
<
HTMLSpanElement
>
(
null
);
const
elementRef
=
useRef
<
HTMLSpanElement
>
(
null
);
const
[
displayedString
,
setDisplayedString
]
=
React
.
useState
(
hash
);
const
[
displayedString
,
setDisplayedString
]
=
React
.
useState
(
hash
);
...
...
ui/shared/SocketAlert.tsx
View file @
4bf9bf5a
import
{
Text
,
Alert
,
Link
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
Alert
}
from
'
toolkit/chakra/alert
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
interface
Props
{
interface
Props
{
className
?:
string
;
className
?:
string
;
}
}
...
...
ui/shared/logs/LogDecodedInputDataHeader.tsx
View file @
4bf9bf5a
...
@@ -45,7 +45,7 @@ const LogDecodedInputDataHeader = ({ methodId, methodCall, isLoading, rightSlot
...
@@ -45,7 +45,7 @@ const LogDecodedInputDataHeader = ({ methodId, methodCall, isLoading, rightSlot
{
rightSlot
}
{
rightSlot
}
</
Flex
>
</
Flex
>
<
Item
label=
"Call"
isLoading=
{
isLoading
}
>
<
Item
label=
"Call"
isLoading=
{
isLoading
}
>
<
Skeleton
loading=
{
isLoading
}
whiteSpace=
"pre-wrap"
w=
"100%"
>
{
methodCall
}
</
Skeleton
>
<
Skeleton
loading=
{
isLoading
}
whiteSpace=
"pre-wrap"
flexGrow=
{
1
}
>
{
methodCall
}
</
Skeleton
>
</
Item
>
</
Item
>
</
VStack
>
</
VStack
>
);
);
...
...
ui/shared/logs/LogIndex.tsx
View file @
4bf9bf5a
...
@@ -14,9 +14,10 @@ const LogIndex = ({ children, isLoading, ...props }: Props) => {
...
@@ -14,9 +14,10 @@ const LogIndex = ({ children, isLoading, ...props }: Props) => {
<
Tooltip
content=
"Log index"
>
<
Tooltip
content=
"Log index"
>
<
Skeleton
loading=
{
isLoading
}
asChild
>
<
Skeleton
loading=
{
isLoading
}
asChild
>
<
Center
<
Center
color=
{
{
_light
:
'
blue.600
'
,
_dark
:
'
gray.50
'
}
}
color=
{
isLoading
?
'
transparent
'
:
{
_light
:
'
blue.600
'
,
_dark
:
'
gray.50
'
}
}
bgColor=
{
{
_light
:
'
blue.50
'
,
_dark
:
'
gray.600
'
}
}
bgColor=
{
isLoading
?
undefined
:
{
_light
:
'
blue.50
'
,
_dark
:
'
gray.600
'
}
}
borderRadius=
"base"
borderRadius=
"base"
px=
{
2
}
{
...
props
}
{
...
props
}
>
>
{
children
}
{
children
}
...
...
ui/shared/logs/LogItem.tsx
View file @
4bf9bf5a
...
@@ -63,12 +63,14 @@ const LogItem = ({ address, index, topics, data, decoded, type, transaction_hash
...
@@ -63,12 +63,14 @@ const LogItem = ({ address, index, topics, data, decoded, type, transaction_hash
hash=
{
txHash
}
hash=
{
txHash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
mr=
{
{
base
:
9
,
lg
:
4
}
}
mr=
{
{
base
:
9
,
lg
:
4
}
}
w=
"100%"
/>
/>
)
:
(
)
:
(
<
AddressEntity
<
AddressEntity
address=
{
address
}
address=
{
address
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
mr=
{
{
base
:
9
,
lg
:
4
}
}
mr=
{
{
base
:
9
,
lg
:
4
}
}
w=
"100%"
/>
/>
)
}
)
}
{
/* api doesn't have find topic feature yet */
}
{
/* api doesn't have find topic feature yet */
}
...
...
ui/withdrawals/beaconChain/BeaconChainWithdrawalsListItem.tsx
View file @
4bf9bf5a
...
@@ -51,8 +51,7 @@ const BeaconChainWithdrawalsListItem = ({ item, isLoading, view }: Props) => {
...
@@ -51,8 +51,7 @@ const BeaconChainWithdrawalsListItem = ({ item, isLoading, view }: Props) => {
<
BlockEntity
<
BlockEntity
number=
{
item
.
block_number
}
number=
{
item
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
textStyle=
"sm"
lineHeight=
{
5
}
/>
/>
</
ListItemMobileGrid
.
Value
>
</
ListItemMobileGrid
.
Value
>
</>
</>
...
...
ui/withdrawals/beaconChain/BeaconChainWithdrawalsTableItem.tsx
View file @
4bf9bf5a
...
@@ -36,8 +36,7 @@ const BeaconChainWithdrawalsTableItem = ({ item, view, isLoading }: Props) => {
...
@@ -36,8 +36,7 @@ const BeaconChainWithdrawalsTableItem = ({ item, view, isLoading }: Props) => {
<
BlockEntity
<
BlockEntity
number=
{
item
.
block_number
}
number=
{
item
.
block_number
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
fontSize=
"sm"
textStyle=
"sm"
lineHeight=
{
5
}
noIcon
noIcon
/>
/>
</
TableCell
>
</
TableCell
>
...
...
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