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
bbec6bcd
Commit
bbec6bcd
authored
Apr 16, 2024
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propRename
parent
086ef3da
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
41 additions
and
41 deletions
+41
-41
AddressAccountHistory.tsx
ui/address/AddressAccountHistory.tsx
+3
-3
AddressBlocksValidated.tsx
ui/address/AddressBlocksValidated.tsx
+3
-3
AddressCoinBalance.tsx
ui/address/AddressCoinBalance.tsx
+3
-3
AddressInternalTxs.tsx
ui/address/AddressInternalTxs.tsx
+3
-3
AddressLogs.tsx
ui/address/AddressLogs.tsx
+3
-3
AddressTokenTransfers.tsx
ui/address/AddressTokenTransfers.tsx
+3
-3
AddressTokens.tsx
ui/address/AddressTokens.tsx
+3
-3
AddressTxs.tsx
ui/address/AddressTxs.tsx
+3
-3
AddressUserOps.tsx
ui/address/AddressUserOps.tsx
+3
-3
AddressWithdrawals.tsx
ui/address/AddressWithdrawals.tsx
+3
-3
Address.tsx
ui/pages/Address.tsx
+11
-11
No files found.
ui/address/AddressAccountHistory.tsx
View file @
bbec6bcd
...
...
@@ -26,10 +26,10 @@ const getFilterValue = (getFilterValueFromQuery<NovesHistoryFilterValue>).bind(n
type
Props
=
{
scrollRef
?:
React
.
RefObject
<
HTMLDivElement
>
;
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
}
const
AddressAccountHistory
=
({
scrollRef
,
isTabsLoading
}:
Props
)
=>
{
const
AddressAccountHistory
=
({
scrollRef
,
shouldRender
=
true
}:
Props
)
=>
{
const
router
=
useRouter
();
const
isMounted
=
useIsMounted
();
...
...
@@ -52,7 +52,7 @@ const AddressAccountHistory = ({ scrollRef, isTabsLoading }: Props) => {
setFilterValue
(
newVal
);
},
[
]);
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/address/AddressBlocksValidated.tsx
View file @
bbec6bcd
...
...
@@ -26,10 +26,10 @@ import AddressBlocksValidatedTableItem from './blocksValidated/AddressBlocksVali
interface
Props
{
scrollRef
?:
React
.
RefObject
<
HTMLDivElement
>
;
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
}
const
AddressBlocksValidated
=
({
scrollRef
,
isTabsLoading
}:
Props
)
=>
{
const
AddressBlocksValidated
=
({
scrollRef
,
shouldRender
=
true
}:
Props
)
=>
{
const
[
socketAlert
,
setSocketAlert
]
=
React
.
useState
(
false
);
const
queryClient
=
useQueryClient
();
const
router
=
useRouter
();
...
...
@@ -87,7 +87,7 @@ const AddressBlocksValidated = ({ scrollRef, isTabsLoading }: Props) => {
handler
:
handleNewSocketMessage
,
});
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/address/AddressCoinBalance.tsx
View file @
bbec6bcd
...
...
@@ -19,10 +19,10 @@ import AddressCoinBalanceChart from './coinBalance/AddressCoinBalanceChart';
import
AddressCoinBalanceHistory
from
'
./coinBalance/AddressCoinBalanceHistory
'
;
type
Props
=
{
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
}
const
AddressCoinBalance
=
({
isTabsLoading
}:
Props
)
=>
{
const
AddressCoinBalance
=
({
shouldRender
=
true
}:
Props
)
=>
{
const
[
socketAlert
,
setSocketAlert
]
=
React
.
useState
(
false
);
const
queryClient
=
useQueryClient
();
const
router
=
useRouter
();
...
...
@@ -85,7 +85,7 @@ const AddressCoinBalance = ({ isTabsLoading }: Props) => {
handler
:
handleNewSocketMessage
,
});
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/address/AddressInternalTxs.tsx
View file @
bbec6bcd
...
...
@@ -25,9 +25,9 @@ const getFilterValue = (getFilterValueFromQuery<AddressFromToFilter>).bind(null,
type
Props
=
{
scrollRef
?:
React
.
RefObject
<
HTMLDivElement
>
;
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
}
const
AddressInternalTxs
=
({
scrollRef
,
isTabsLoading
}:
Props
)
=>
{
const
AddressInternalTxs
=
({
scrollRef
,
shouldRender
=
true
}:
Props
)
=>
{
const
router
=
useRouter
();
const
isMounted
=
useIsMounted
();
...
...
@@ -62,7 +62,7 @@ const AddressInternalTxs = ({ scrollRef, isTabsLoading }: Props) => {
onFilterChange
({
filter
:
newVal
});
},
[
onFilterChange
]);
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/address/AddressLogs.tsx
View file @
bbec6bcd
...
...
@@ -15,10 +15,10 @@ import AddressCsvExportLink from './AddressCsvExportLink';
type
Props
=
{
scrollRef
?:
React
.
RefObject
<
HTMLDivElement
>
;
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
}
const
AddressLogs
=
({
scrollRef
,
isTabsLoading
}:
Props
)
=>
{
const
AddressLogs
=
({
scrollRef
,
shouldRender
=
true
}:
Props
)
=>
{
const
router
=
useRouter
();
const
isMounted
=
useIsMounted
();
...
...
@@ -48,7 +48,7 @@ const AddressLogs = ({ scrollRef, isTabsLoading }: Props) => {
</
ActionBar
>
);
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/address/AddressTokenTransfers.tsx
View file @
bbec6bcd
...
...
@@ -64,12 +64,12 @@ const matchFilters = (filters: Filters, tokenTransfer: TokenTransfer, address?:
type
Props
=
{
scrollRef
?:
React
.
RefObject
<
HTMLDivElement
>
;
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
// for tests only
overloadCount
?:
number
;
}
const
AddressTokenTransfers
=
({
scrollRef
,
overloadCount
=
OVERLOAD_COUNT
,
isTabsLoading
}:
Props
)
=>
{
const
AddressTokenTransfers
=
({
scrollRef
,
overloadCount
=
OVERLOAD_COUNT
,
shouldRender
=
true
}:
Props
)
=>
{
const
router
=
useRouter
();
const
queryClient
=
useQueryClient
();
const
isMobile
=
useIsMobile
();
...
...
@@ -190,7 +190,7 @@ const AddressTokenTransfers = ({ scrollRef, overloadCount = OVERLOAD_COUNT, isTa
type
:
'
ERC-20
'
as
const
,
}),
[
tokenFilter
]);
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/address/AddressTokens.tsx
View file @
bbec6bcd
...
...
@@ -43,10 +43,10 @@ const TAB_LIST_PROPS_MOBILE = {
const
getTokenFilterValue
=
(
getFilterValuesFromQuery
<
NFTTokenType
>
).
bind
(
null
,
NFT_TOKEN_TYPE_IDS
);
type
Props
=
{
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
}
const
AddressTokens
=
({
isTabsLoading
}:
Props
)
=>
{
const
AddressTokens
=
({
shouldRender
=
true
}:
Props
)
=>
{
const
router
=
useRouter
();
const
isMobile
=
useIsMobile
();
const
isMounted
=
useIsMounted
();
...
...
@@ -105,7 +105,7 @@ const AddressTokens = ({ isTabsLoading }: Props) => {
setTokenTypes
(
value
);
},
[
nftsQuery
,
collectionsQuery
]);
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/address/AddressTxs.tsx
View file @
bbec6bcd
...
...
@@ -48,12 +48,12 @@ const matchFilter = (filterValue: AddressFromToFilter, transaction: Transaction,
type
Props
=
{
scrollRef
?:
React
.
RefObject
<
HTMLDivElement
>
;
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
// for tests only
overloadCount
?:
number
;
}
const
AddressTxs
=
({
scrollRef
,
overloadCount
=
OVERLOAD_COUNT
,
isTabsLoading
}:
Props
)
=>
{
const
AddressTxs
=
({
scrollRef
,
overloadCount
=
OVERLOAD_COUNT
,
shouldRender
=
true
}:
Props
)
=>
{
const
router
=
useRouter
();
const
queryClient
=
useQueryClient
();
const
isMounted
=
useIsMounted
();
...
...
@@ -159,7 +159,7 @@ const AddressTxs = ({ scrollRef, overloadCount = OVERLOAD_COUNT, isTabsLoading }
handler: handleNewSocketMessage,
});
if (!isMounted ||
isTabsLoading
) {
if (!isMounted ||
!shouldRender
) {
return null;
}
...
...
ui/address/AddressUserOps.tsx
View file @
bbec6bcd
...
...
@@ -10,10 +10,10 @@ import UserOpsContent from 'ui/userOps/UserOpsContent';
type
Props
=
{
scrollRef
?:
React
.
RefObject
<
HTMLDivElement
>
;
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
}
const
AddressUserOps
=
({
scrollRef
,
isTabsLoading
}:
Props
)
=>
{
const
AddressUserOps
=
({
scrollRef
,
shouldRender
=
true
}:
Props
)
=>
{
const
router
=
useRouter
();
const
isMounted
=
useIsMounted
();
...
...
@@ -32,7 +32,7 @@ const AddressUserOps = ({ scrollRef, isTabsLoading }: Props) => {
filters
:
{
sender
:
hash
},
});
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/address/AddressWithdrawals.tsx
View file @
bbec6bcd
...
...
@@ -15,9 +15,9 @@ import BeaconChainWithdrawalsTable from 'ui/withdrawals/beaconChain/BeaconChainW
type
Props
=
{
scrollRef
?:
React
.
RefObject
<
HTMLDivElement
>
;
isTabsLoading
?:
boolean
;
shouldRender
?:
boolean
;
}
const
AddressWithdrawals
=
({
scrollRef
,
isTabsLoading
}:
Props
)
=>
{
const
AddressWithdrawals
=
({
scrollRef
,
shouldRender
=
true
}:
Props
)
=>
{
const
router
=
useRouter
();
const
isMounted
=
useIsMounted
();
...
...
@@ -35,7 +35,7 @@ const AddressWithdrawals = ({ scrollRef, isTabsLoading }: Props) => {
},
});
if
(
!
isMounted
||
isTabsLoading
)
{
if
(
!
isMounted
||
!
shouldRender
)
{
return
null
;
}
...
...
ui/pages/Address.tsx
View file @
bbec6bcd
...
...
@@ -83,13 +83,13 @@ const AddressPageContent = () => {
id
:
'
txs
'
,
title
:
'
Transactions
'
,
count
:
addressTabsCountersQuery
.
data
?.
transactions_count
,
component
:
<
AddressTxs
scrollRef=
{
tabsScrollRef
}
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressTxs
scrollRef=
{
tabsScrollRef
}
shouldRender=
{
!
isTabsLoading
}
/>,
},
txInterpretation
.
isEnabled
&&
txInterpretation
.
provider
===
'
noves
'
?
{
id
:
'
account_history
'
,
title
:
'
Account history
'
,
component
:
<
AddressAccountHistory
scrollRef=
{
tabsScrollRef
}
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressAccountHistory
scrollRef=
{
tabsScrollRef
}
shouldRender=
{
!
isTabsLoading
}
/>,
}
:
undefined
,
config
.
features
.
userOps
.
isEnabled
&&
Boolean
(
userOpsAccountQuery
.
data
?.
total_ops
)
?
...
...
@@ -97,7 +97,7 @@ const AddressPageContent = () => {
id
:
'
user_ops
'
,
title
:
'
User operations
'
,
count
:
userOpsAccountQuery
.
data
?.
total_ops
,
component
:
<
AddressUserOps
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressUserOps
shouldRender=
{
!
isTabsLoading
}
/>,
}
:
undefined
,
config
.
features
.
beaconChain
.
isEnabled
&&
addressTabsCountersQuery
.
data
?.
withdrawals_count
?
...
...
@@ -105,39 +105,39 @@ const AddressPageContent = () => {
id
:
'
withdrawals
'
,
title
:
'
Withdrawals
'
,
count
:
addressTabsCountersQuery
.
data
?.
withdrawals_count
,
component
:
<
AddressWithdrawals
scrollRef=
{
tabsScrollRef
}
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressWithdrawals
scrollRef=
{
tabsScrollRef
}
shouldRender=
{
!
isTabsLoading
}
/>,
}
:
undefined
,
{
id
:
'
token_transfers
'
,
title
:
'
Token transfers
'
,
count
:
addressTabsCountersQuery
.
data
?.
token_transfers_count
,
component
:
<
AddressTokenTransfers
scrollRef=
{
tabsScrollRef
}
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressTokenTransfers
scrollRef=
{
tabsScrollRef
}
shouldRender=
{
!
isTabsLoading
}
/>,
},
{
id
:
'
tokens
'
,
title
:
'
Tokens
'
,
count
:
addressTabsCountersQuery
.
data
?.
token_balances_count
,
component
:
<
AddressTokens
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressTokens
shouldRender=
{
!
isTabsLoading
}
/>,
subTabs
:
TOKEN_TABS
,
},
{
id
:
'
internal_txns
'
,
title
:
'
Internal txns
'
,
count
:
addressTabsCountersQuery
.
data
?.
internal_txs_count
,
component
:
<
AddressInternalTxs
scrollRef=
{
tabsScrollRef
}
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressInternalTxs
scrollRef=
{
tabsScrollRef
}
shouldRender=
{
!
isTabsLoading
}
/>,
},
{
id
:
'
coin_balance_history
'
,
title
:
'
Coin balance history
'
,
component
:
<
AddressCoinBalance
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressCoinBalance
shouldRender=
{
!
isTabsLoading
}
/>,
},
config
.
chain
.
verificationType
===
'
validation
'
&&
addressTabsCountersQuery
.
data
?.
validations_count
?
{
id
:
'
blocks_validated
'
,
title
:
'
Blocks validated
'
,
count
:
addressTabsCountersQuery
.
data
?.
validations_count
,
component
:
<
AddressBlocksValidated
scrollRef=
{
tabsScrollRef
}
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressBlocksValidated
scrollRef=
{
tabsScrollRef
}
shouldRender=
{
!
isTabsLoading
}
/>,
}
:
undefined
,
addressTabsCountersQuery
.
data
?.
logs_count
?
...
...
@@ -145,7 +145,7 @@ const AddressPageContent = () => {
id
:
'
logs
'
,
title
:
'
Logs
'
,
count
:
addressTabsCountersQuery
.
data
?.
logs_count
,
component
:
<
AddressLogs
scrollRef=
{
tabsScrollRef
}
isTabsLoading=
{
isTabsLoading
}
/>,
component
:
<
AddressLogs
scrollRef=
{
tabsScrollRef
}
shouldRender=
{
!
isTabsLoading
}
/>,
}
:
undefined
,
...
...
@@ -186,7 +186,7 @@ const AddressPageContent = () => {
const
content
=
(
addressQuery
.
isError
||
addressQuery
.
isDegradedData
)
?
null
:
<
RoutedTabs
tabs=
{
tabs
}
tabListProps=
{
{
mt
:
8
}
}
isLoading=
{
is
Loading
||
addressTabsCountersQuery
.
isPlaceholderData
}
/>;
<
RoutedTabs
tabs=
{
tabs
}
tabListProps=
{
{
mt
:
8
}
}
isLoading=
{
is
TabsLoading
}
/>;
const
backLink
=
React
.
useMemo
(()
=>
{
const
hasGoBackLink
=
appProps
.
referrer
&&
appProps
.
referrer
.
includes
(
'
/accounts
'
);
...
...
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