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
e2d67563
Commit
e2d67563
authored
May 10, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix account menu text for token info item
parent
ef5cd3f7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
13 deletions
+18
-13
Menu.tsx
ui/shared/AddressActions/Menu.tsx
+2
-1
TokenInfoMenuItem.tsx
ui/shared/AddressActions/TokenInfoMenuItem.tsx
+9
-3
TokenTransferListItem.tsx
ui/token/TokenTransfer/TokenTransferListItem.tsx
+6
-8
TokenVerifiedInfo.tsx
ui/token/TokenVerifiedInfo.tsx
+1
-1
No files found.
ui/shared/AddressActions/Menu.tsx
View file @
e2d67563
...
@@ -35,7 +35,8 @@ const AddressActions = ({ isLoading }: Props) => {
...
@@ -35,7 +35,8 @@ const AddressActions = ({ isLoading }: Props) => {
</
MenuButton
>
</
MenuButton
>
</
Skeleton
>
</
Skeleton
>
<
MenuList
minWidth=
"180px"
zIndex=
"popover"
>
<
MenuList
minWidth=
"180px"
zIndex=
"popover"
>
{
isTokenPage
&&
appConfig
.
contractInfoApi
.
endpoint
&&
appConfig
.
adminServiceApi
.
endpoint
&&
<
TokenInfoMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
}
{
isTokenPage
&&
appConfig
.
contractInfoApi
.
endpoint
&&
appConfig
.
adminServiceApi
.
endpoint
&&
appConfig
.
isAccountSupported
&&
<
TokenInfoMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
}
<
PrivateTagMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
<
PrivateTagMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
<
PublicTagMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
<
PublicTagMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
</
MenuList
>
</
MenuList
>
...
...
ui/shared/AddressActions/TokenInfoMenuItem.tsx
View file @
e2d67563
import
{
MenuItem
,
Icon
,
chakra
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
{
MenuItem
,
Icon
,
chakra
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
{
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
appConfig
from
'
configs/app/config
'
;
import
appConfig
from
'
configs/app/config
'
;
import
iconEdit
from
'
icons/edit.svg
'
;
import
iconEdit
from
'
icons/edit.svg
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
,
{
getResourceKey
}
from
'
lib/api/useApiQuery
'
;
import
useRedirectIfNotAuth
from
'
lib/hooks/useRedirectIfNotAuth
'
;
import
useRedirectIfNotAuth
from
'
lib/hooks/useRedirectIfNotAuth
'
;
import
AddressVerificationModal
from
'
ui/addressVerification/AddressVerificationModal
'
;
import
AddressVerificationModal
from
'
ui/addressVerification/AddressVerificationModal
'
;
...
@@ -17,6 +18,7 @@ const TokenInfoMenuItem = ({ className, hash }: Props) => {
...
@@ -17,6 +18,7 @@ const TokenInfoMenuItem = ({ className, hash }: Props) => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
modal
=
useDisclosure
();
const
modal
=
useDisclosure
();
const
redirectIfNotAuth
=
useRedirectIfNotAuth
();
const
redirectIfNotAuth
=
useRedirectIfNotAuth
();
const
queryClient
=
useQueryClient
();
const
verifiedAddressesQuery
=
useApiQuery
(
'
verified_addresses
'
,
{
const
verifiedAddressesQuery
=
useApiQuery
(
'
verified_addresses
'
,
{
pathParams
:
{
chainId
:
appConfig
.
network
.
id
},
pathParams
:
{
chainId
:
appConfig
.
network
.
id
},
...
@@ -48,21 +50,25 @@ const TokenInfoMenuItem = ({ className, hash }: Props) => {
...
@@ -48,21 +50,25 @@ const TokenInfoMenuItem = ({ className, hash }: Props) => {
const
icon
=
<
Icon
as=
{
iconEdit
}
boxSize=
{
6
}
mr=
{
2
}
p=
{
1
}
/>;
const
icon
=
<
Icon
as=
{
iconEdit
}
boxSize=
{
6
}
mr=
{
2
}
p=
{
1
}
/>;
const
content
=
(()
=>
{
const
content
=
(()
=>
{
const
verifiedTokenInfo
=
queryClient
.
getQueryData
(
getResourceKey
(
'
token_verified_info
'
,
{
pathParams
:
{
hash
,
chainId
:
appConfig
.
network
.
id
}
}));
if
(
!
verifiedAddressesQuery
.
data
?.
verifiedAddresses
.
find
(({
contractAddress
})
=>
contractAddress
.
toLowerCase
()
===
hash
.
toLowerCase
()))
{
if
(
!
verifiedAddressesQuery
.
data
?.
verifiedAddresses
.
find
(({
contractAddress
})
=>
contractAddress
.
toLowerCase
()
===
hash
.
toLowerCase
()))
{
return
(
return
(
<
MenuItem
className=
{
className
}
onClick=
{
handleAddAddressClick
}
>
<
MenuItem
className=
{
className
}
onClick=
{
handleAddAddressClick
}
>
{
icon
}
{
icon
}
<
span
>
Add token info
</
span
>
<
span
>
{
verifiedTokenInfo
?
'
Update token info
'
:
'
Add token info
'
}
</
span
>
</
MenuItem
>
</
MenuItem
>
);
);
}
}
const
hasApplication
=
applicationsQuery
.
data
?.
submissions
.
some
(({
tokenAddress
})
=>
tokenAddress
.
toLowerCase
()
===
hash
.
toLowerCase
());
return
(
return
(
<
MenuItem
className=
{
className
}
onClick=
{
handleAddApplicationClick
}
>
<
MenuItem
className=
{
className
}
onClick=
{
handleAddApplicationClick
}
>
{
icon
}
{
icon
}
<
span
>
<
span
>
{
{
applicationsQuery
.
data
?.
submissions
.
some
(({
tokenAddress
})
=>
tokenAddress
.
toLowerCase
()
===
hash
.
toLowerCase
())
?
hasApplication
||
verifiedTokenInfo
?
'
Update token info
'
:
'
Update token info
'
:
'
Add token info
'
'
Add token info
'
}
}
...
...
ui/token/TokenTransfer/TokenTransferListItem.tsx
View file @
e2d67563
import
{
Text
,
Flex
,
Icon
,
useColorModeValue
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
Icon
,
useColorModeValue
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -63,13 +63,11 @@ const TokenTransferListItem = ({
...
@@ -63,13 +63,11 @@ const TokenTransferListItem = ({
</
Address
>
</
Address
>
</
Flex
>
</
Flex
>
{
timestamp
&&
(
{
timestamp
&&
(
<
Text
variant=
"secondary"
fontWeight=
"400"
fontSize=
"sm"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
fontWeight=
"400"
fontSize=
"sm"
color=
"text_secondary"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"inline-block"
>
<
span
>
<
span
>
{
timeAgo
}
{
timeAgo
}
</
span
>
</
span
>
</
Skeleton
>
</
Skeleton
>
</
Text
>
)
}
)
}
</
Flex
>
</
Flex
>
{
method
&&
<
Tag
isLoading=
{
isLoading
}
>
{
method
}
</
Tag
>
}
{
method
&&
<
Tag
isLoading=
{
isLoading
}
>
{
method
}
</
Tag
>
}
...
...
ui/token/TokenVerifiedInfo.tsx
View file @
e2d67563
...
@@ -38,7 +38,7 @@ const TokenVerifiedInfo = ({ verifiedInfoQuery, isVerifiedInfoEnabled, hash }: P
...
@@ -38,7 +38,7 @@ const TokenVerifiedInfo = ({ verifiedInfoQuery, isVerifiedInfoEnabled, hash }: P
}
}
if
(
isError
)
{
if
(
isError
)
{
return
null
;
return
explorers
;
}
}
const
websiteLink
=
(()
=>
{
const
websiteLink
=
(()
=>
{
...
...
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