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
dcdb5f7c
Commit
dcdb5f7c
authored
Apr 19, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename component
parent
fa319e9f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
14 deletions
+12
-14
TokensListItem.tsx
ui/address/tokens/TokensListItem.tsx
+2
-3
TokensTableItem.tsx
ui/address/tokens/TokensTableItem.tsx
+2
-3
AddressHeadingInfo.tsx
ui/shared/AddressHeadingInfo.tsx
+2
-2
AddressAddToWallet.tsx
ui/shared/address/AddressAddToWallet.tsx
+2
-2
TokensListItem.tsx
ui/tokens/TokensListItem.tsx
+2
-2
TokensTableItem.tsx
ui/tokens/TokensTableItem.tsx
+2
-2
No files found.
ui/address/tokens/TokensListItem.tsx
View file @
dcdb5f7c
...
@@ -4,13 +4,12 @@ import React from 'react';
...
@@ -4,13 +4,12 @@ import React from 'react';
import
type
{
AddressTokenBalance
}
from
'
types/api/address
'
;
import
type
{
AddressTokenBalance
}
from
'
types/api/address
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
AddressAddToWallet
from
'
ui/shared/address/AddressAddToWallet
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile/ListItemMobile
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile/ListItemMobile
'
;
import
TokenLogo
from
'
ui/shared/TokenLogo
'
;
import
TokenLogo
from
'
ui/shared/TokenLogo
'
;
import
AddressAddToMetaMask
from
'
../details/AddressAddToMetaMask
'
;
type
Props
=
AddressTokenBalance
;
type
Props
=
AddressTokenBalance
;
const
TokensListItem
=
({
token
,
value
}:
Props
)
=>
{
const
TokensListItem
=
({
token
,
value
}:
Props
)
=>
{
...
@@ -31,7 +30,7 @@ const TokensListItem = ({ token, value }: Props) => {
...
@@ -31,7 +30,7 @@ const TokensListItem = ({ token, value }: Props) => {
<
Flex
alignItems=
"center"
pl=
{
8
}
>
<
Flex
alignItems=
"center"
pl=
{
8
}
>
<
AddressLink
hash=
{
token
.
address
}
type=
"address"
truncation=
"constant"
/>
<
AddressLink
hash=
{
token
.
address
}
type=
"address"
truncation=
"constant"
/>
<
CopyToClipboard
text=
{
token
.
address
}
ml=
{
1
}
/>
<
CopyToClipboard
text=
{
token
.
address
}
ml=
{
1
}
/>
<
AddressAddTo
MetaMask
token=
{
token
}
ml=
{
2
}
/>
<
AddressAddTo
Wallet
token=
{
token
}
ml=
{
2
}
/>
</
Flex
>
</
Flex
>
{
token
.
exchange_rate
!==
undefined
&&
token
.
exchange_rate
!==
null
&&
(
{
token
.
exchange_rate
!==
undefined
&&
token
.
exchange_rate
!==
null
&&
(
<
HStack
spacing=
{
3
}
>
<
HStack
spacing=
{
3
}
>
...
...
ui/address/tokens/TokensTableItem.tsx
View file @
dcdb5f7c
...
@@ -4,12 +4,11 @@ import React from 'react';
...
@@ -4,12 +4,11 @@ import React from 'react';
import
type
{
AddressTokenBalance
}
from
'
types/api/address
'
;
import
type
{
AddressTokenBalance
}
from
'
types/api/address
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
AddressAddToWallet
from
'
ui/shared/address/AddressAddToWallet
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
TokenLogo
from
'
ui/shared/TokenLogo
'
;
import
TokenLogo
from
'
ui/shared/TokenLogo
'
;
import
AddressAddToMetaMask
from
'
../details/AddressAddToMetaMask
'
;
type
Props
=
AddressTokenBalance
;
type
Props
=
AddressTokenBalance
;
const
TokensTableItem
=
({
const
TokensTableItem
=
({
...
@@ -38,7 +37,7 @@ const TokensTableItem = ({
...
@@ -38,7 +37,7 @@ const TokensTableItem = ({
<
AddressLink
hash=
{
token
.
address
}
type=
"address"
truncation=
"constant"
/>
<
AddressLink
hash=
{
token
.
address
}
type=
"address"
truncation=
"constant"
/>
<
CopyToClipboard
text=
{
token
.
address
}
ml=
{
1
}
/>
<
CopyToClipboard
text=
{
token
.
address
}
ml=
{
1
}
/>
</
Flex
>
</
Flex
>
<
AddressAddTo
MetaMask
token=
{
token
}
ml=
{
4
}
/>
<
AddressAddTo
Wallet
token=
{
token
}
ml=
{
4
}
/>
</
Flex
>
</
Flex
>
</
Td
>
</
Td
>
<
Td
isNumeric
verticalAlign=
"middle"
>
<
Td
isNumeric
verticalAlign=
"middle"
>
...
...
ui/shared/AddressHeadingInfo.tsx
View file @
dcdb5f7c
...
@@ -6,9 +6,9 @@ import type { TokenInfo } from 'types/api/token';
...
@@ -6,9 +6,9 @@ import type { TokenInfo } from 'types/api/token';
import
config
from
'
configs/app/config
'
;
import
config
from
'
configs/app/config
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
AddressAddToMetaMask
from
'
ui/address/details/AddressAddToMetaMask
'
;
import
AddressFavoriteButton
from
'
ui/address/details/AddressFavoriteButton
'
;
import
AddressFavoriteButton
from
'
ui/address/details/AddressFavoriteButton
'
;
import
AddressQrCode
from
'
ui/address/details/AddressQrCode
'
;
import
AddressQrCode
from
'
ui/address/details/AddressQrCode
'
;
import
AddressAddToWallet
from
'
ui/shared/address/AddressAddToWallet
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
...
@@ -35,7 +35,7 @@ const AddressHeadingInfo = ({ address, token, isLinkDisabled }: Props) => {
...
@@ -35,7 +35,7 @@ const AddressHeadingInfo = ({ address, token, isLinkDisabled }: Props) => {
isDisabled=
{
isLinkDisabled
}
isDisabled=
{
isLinkDisabled
}
/>
/>
<
CopyToClipboard
text=
{
address
.
hash
}
/>
<
CopyToClipboard
text=
{
address
.
hash
}
/>
{
address
.
is_contract
&&
token
&&
<
AddressAddTo
MetaMask
ml=
{
2
}
token=
{
token
}
/>
}
{
address
.
is_contract
&&
token
&&
<
AddressAddTo
Wallet
ml=
{
2
}
token=
{
token
}
/>
}
{
!
address
.
is_contract
&&
config
.
isAccountSupported
&&
(
{
!
address
.
is_contract
&&
config
.
isAccountSupported
&&
(
<
AddressFavoriteButton
hash=
{
address
.
hash
}
watchListId=
{
address
.
watchlist_address_id
}
ml=
{
3
}
/>
<
AddressFavoriteButton
hash=
{
address
.
hash
}
watchListId=
{
address
.
watchlist_address_id
}
ml=
{
3
}
/>
)
}
)
}
...
...
ui/
address/details/AddressAddToMetaMask
.tsx
→
ui/
shared/address/AddressAddToWallet
.tsx
View file @
dcdb5f7c
...
@@ -11,7 +11,7 @@ interface Props {
...
@@ -11,7 +11,7 @@ interface Props {
token
:
TokenInfo
;
token
:
TokenInfo
;
}
}
const
AddressAddTo
MetaMask
=
({
className
,
token
}:
Props
)
=>
{
const
AddressAddTo
Wallet
=
({
className
,
token
}:
Props
)
=>
{
const
toast
=
useToast
();
const
toast
=
useToast
();
const
handleClick
=
React
.
useCallback
(
async
()
=>
{
const
handleClick
=
React
.
useCallback
(
async
()
=>
{
...
@@ -63,4 +63,4 @@ const AddressAddToMetaMask = ({ className, token }: Props) => {
...
@@ -63,4 +63,4 @@ const AddressAddToMetaMask = ({ className, token }: Props) => {
);
);
};
};
export
default
React
.
memo
(
chakra
(
AddressAddTo
MetaMask
));
export
default
React
.
memo
(
chakra
(
AddressAddTo
Wallet
));
ui/tokens/TokensListItem.tsx
View file @
dcdb5f7c
...
@@ -4,7 +4,7 @@ import React from 'react';
...
@@ -4,7 +4,7 @@ import React from 'react';
import
type
{
TokenInfo
}
from
'
types/api/token
'
;
import
type
{
TokenInfo
}
from
'
types/api/token
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
AddressAddTo
MetaMask
from
'
ui/address/details/AddressAddToMetaMask
'
;
import
AddressAddTo
Wallet
from
'
ui/shared/address/AddressAddToWallet
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile/ListItemMobile
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile/ListItemMobile
'
;
...
@@ -60,7 +60,7 @@ const TokensTableItem = ({
...
@@ -60,7 +60,7 @@ const TokensTableItem = ({
<
AddressLink
fontSize=
"sm"
hash=
{
address
}
type=
"address"
truncation=
"constant"
/>
<
AddressLink
fontSize=
"sm"
hash=
{
address
}
type=
"address"
truncation=
"constant"
/>
<
CopyToClipboard
text=
{
address
}
ml=
{
1
}
/>
<
CopyToClipboard
text=
{
address
}
ml=
{
1
}
/>
</
Flex
>
</
Flex
>
<
AddressAddTo
MetaMask
token=
{
token
}
/>
<
AddressAddTo
Wallet
token=
{
token
}
/>
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
{
exchangeRate
&&
(
{
exchangeRate
&&
(
...
...
ui/tokens/TokensTableItem.tsx
View file @
dcdb5f7c
...
@@ -4,7 +4,7 @@ import React from 'react';
...
@@ -4,7 +4,7 @@ import React from 'react';
import
type
{
TokenInfo
}
from
'
types/api/token
'
;
import
type
{
TokenInfo
}
from
'
types/api/token
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
AddressAddTo
MetaMask
from
'
ui/address/details/AddressAddToMetaMask
'
;
import
AddressAddTo
Wallet
from
'
ui/shared/address/AddressAddToWallet
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
TokenLogo
from
'
ui/shared/TokenLogo
'
;
import
TokenLogo
from
'
ui/shared/TokenLogo
'
;
...
@@ -61,7 +61,7 @@ const TokensTableItem = ({
...
@@ -61,7 +61,7 @@ const TokensTableItem = ({
<
AddressLink
fontSize=
"sm"
hash=
{
address
}
type=
"address"
truncation=
"constant"
fontWeight=
{
500
}
/>
<
AddressLink
fontSize=
"sm"
hash=
{
address
}
type=
"address"
truncation=
"constant"
fontWeight=
{
500
}
/>
<
CopyToClipboard
text=
{
address
}
ml=
{
1
}
/>
<
CopyToClipboard
text=
{
address
}
ml=
{
1
}
/>
</
Flex
>
</
Flex
>
<
AddressAddTo
MetaMask
token=
{
token
}
/>
<
AddressAddTo
Wallet
token=
{
token
}
/>
</
Flex
>
</
Flex
>
<
Tag
flexShrink=
{
0
}
ml=
{
8
}
mt=
{
3
}
>
{
type
}
</
Tag
>
<
Tag
flexShrink=
{
0
}
ml=
{
8
}
mt=
{
3
}
>
{
type
}
</
Tag
>
</
Box
>
</
Box
>
...
...
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