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
93521d44
Commit
93521d44
authored
Dec 23, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contract icon for all addresses
parent
420bfd15
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
64 additions
and
46 deletions
+64
-46
account.ts
types/api/account.ts
+5
-2
AddressDetails.tsx
ui/address/AddressDetails.tsx
+1
-1
AddressIntTxsListItem.tsx
ui/address/internals/AddressIntTxsListItem.tsx
+2
-2
AddressIntTxsTableItem.tsx
ui/address/internals/AddressIntTxsTableItem.tsx
+2
-2
CustomAbiListItem.tsx
ui/customAbi/CustomAbiTable/CustomAbiListItem.tsx
+1
-1
CustomAbiTableItem.tsx
ui/customAbi/CustomAbiTable/CustomAbiTableItem.tsx
+1
-1
LatestTxsItem.tsx
ui/home/LatestTxsItem.tsx
+2
-2
AddressTagListItem.tsx
ui/privateTags/AddressTagTable/AddressTagListItem.tsx
+1
-1
AddressTagTableItem.tsx
ui/privateTags/AddressTagTable/AddressTagTableItem.tsx
+1
-1
PublicTagListItem.tsx
ui/publicTags/PublicTagTable/PublicTagListItem.tsx
+1
-1
PublicTagTableItem.tsx
ui/publicTags/PublicTagTable/PublicTagTableItem.tsx
+1
-1
AddressSnippet.tsx
ui/shared/AddressSnippet.tsx
+7
-9
TokenTransferListItem.tsx
ui/shared/TokenTransfer/TokenTransferListItem.tsx
+2
-2
TokenTransferTableItem.tsx
ui/shared/TokenTransfer/TokenTransferTableItem.tsx
+2
-2
AddressIcon.tsx
ui/shared/address/AddressIcon.tsx
+17
-2
TxDetails.tsx
ui/tx/TxDetails.tsx
+2
-2
TxInternalsListItem.tsx
ui/tx/internals/TxInternalsListItem.tsx
+2
-2
TxInternalsTableItem.tsx
ui/tx/internals/TxInternalsTableItem.tsx
+2
-2
TxLogItem.tsx
ui/tx/logs/TxLogItem.tsx
+1
-1
TxStateListItem.tsx
ui/tx/state/TxStateListItem.tsx
+3
-2
TxStateTableItem.tsx
ui/tx/state/TxStateTableItem.tsx
+3
-2
TxsListItem.tsx
ui/txs/TxsListItem.tsx
+2
-2
TxsTableItem.tsx
ui/txs/TxsTableItem.tsx
+2
-2
WatchListAddressItem.tsx
ui/watchlist/WatchlistTable/WatchListAddressItem.tsx
+1
-1
No files found.
types/api/account.ts
View file @
93521d44
import
type
{
AddressParam
}
from
'
./addressParams
'
;
import
type
{
AddressParam
}
from
'
./addressParams
'
;
export
interface
AddressTag
{
export
interface
AddressTag
{
address_hash
:
string
;
address_hash
:
string
;
address
:
AddressParam
;
name
:
string
;
name
:
string
;
id
:
string
;
id
:
string
;
}
}
...
@@ -64,7 +65,7 @@ export interface WatchlistAddress {
...
@@ -64,7 +65,7 @@ export interface WatchlistAddress {
notification_settings
:
NotificationSettings
;
notification_settings
:
NotificationSettings
;
notification_methods
:
NotificationMethods
;
notification_methods
:
NotificationMethods
;
id
:
string
;
id
:
string
;
address
?
:
AddressParam
;
address
:
AddressParam
;
}
}
export
interface
WatchlistTokensResponse
{
export
interface
WatchlistTokensResponse
{
...
@@ -89,10 +90,11 @@ export interface PublicTag {
...
@@ -89,10 +90,11 @@ export interface PublicTag {
email
:
string
;
email
:
string
;
company
:
string
;
company
:
string
;
addresses
:
Array
<
string
>
;
addresses
:
Array
<
string
>
;
addresses_with_info
:
Array
<
AddressParam
>
;
additional_comment
:
string
;
additional_comment
:
string
;
}
}
export
type
PublicTagNew
=
Omit
<
PublicTag
,
'
id
'
>
export
type
PublicTagNew
=
Omit
<
PublicTag
,
'
id
'
|
'
addresses_with_info
'
>
export
type
PublicTags
=
Array
<
PublicTag
>
;
export
type
PublicTags
=
Array
<
PublicTag
>
;
...
@@ -102,6 +104,7 @@ export interface CustomAbi {
...
@@ -102,6 +104,7 @@ export interface CustomAbi {
name
:
string
;
name
:
string
;
id
:
number
;
id
:
number
;
contract_address_hash
:
string
;
contract_address_hash
:
string
;
contract_address
:
AddressParam
;
abi
:
Array
<
AbiItem
>
;
abi
:
Array
<
AbiItem
>
;
}
}
...
...
ui/address/AddressDetails.tsx
View file @
93521d44
...
@@ -62,7 +62,7 @@ const AddressDetails = ({ addressQuery }: Props) => {
...
@@ -62,7 +62,7 @@ const AddressDetails = ({ addressQuery }: Props) => {
return
(
return
(
<
Box
>
<
Box
>
<
Flex
alignItems=
"center"
>
<
Flex
alignItems=
"center"
>
<
AddressIcon
hash=
{
addressQuery
.
data
.
hash
}
/>
<
AddressIcon
address=
{
addressQuery
.
data
}
/>
<
Text
ml=
{
2
}
fontFamily=
"heading"
fontWeight=
{
500
}
>
<
Text
ml=
{
2
}
fontFamily=
"heading"
fontWeight=
{
500
}
>
{
isMobile
?
<
HashStringShorten
hash=
{
addressQuery
.
data
.
hash
}
/>
:
addressQuery
.
data
.
hash
}
{
isMobile
?
<
HashStringShorten
hash=
{
addressQuery
.
data
.
hash
}
/>
:
addressQuery
.
data
.
hash
}
</
Text
>
</
Text
>
...
...
ui/address/internals/AddressIntTxsListItem.tsx
View file @
93521d44
...
@@ -53,7 +53,7 @@ const TxInternalsListItem = ({
...
@@ -53,7 +53,7 @@ const TxInternalsListItem = ({
</
HStack
>
</
HStack
>
<
Box
w=
"100%"
display=
"flex"
columnGap=
{
3
}
>
<
Box
w=
"100%"
display=
"flex"
columnGap=
{
3
}
>
<
Address
width=
"calc((100% - 48px) / 2)"
>
<
Address
width=
"calc((100% - 48px) / 2)"
>
<
AddressIcon
hash=
{
from
.
hash
}
/>
<
AddressIcon
address=
{
from
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
/>
</
Address
>
</
Address
>
{
(
isIn
||
isOut
)
?
{
(
isIn
||
isOut
)
?
...
@@ -61,7 +61,7 @@ const TxInternalsListItem = ({
...
@@ -61,7 +61,7 @@ const TxInternalsListItem = ({
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
color=
"gray.500"
/>
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
color=
"gray.500"
/>
}
}
<
Address
width=
"calc((100% - 48px) / 2)"
>
<
Address
width=
"calc((100% - 48px) / 2)"
>
<
AddressIcon
hash=
{
toData
.
hash
}
/>
<
AddressIcon
address=
{
toData
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
toData
.
hash
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
toData
.
hash
}
/>
</
Address
>
</
Address
>
</
Box
>
</
Box
>
...
...
ui/address/internals/AddressIntTxsTableItem.tsx
View file @
93521d44
...
@@ -61,7 +61,7 @@ const AddressIntTxsTableItem = ({
...
@@ -61,7 +61,7 @@ const AddressIntTxsTableItem = ({
</
Td
>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
Td
verticalAlign=
"middle"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
<
AddressIcon
hash=
{
from
.
hash
}
/>
<
AddressIcon
address=
{
from
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
alias=
{
from
.
name
}
flexGrow=
{
1
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
alias=
{
from
.
name
}
flexGrow=
{
1
}
/>
</
Address
>
</
Address
>
</
Td
>
</
Td
>
...
@@ -73,7 +73,7 @@ const AddressIntTxsTableItem = ({
...
@@ -73,7 +73,7 @@ const AddressIntTxsTableItem = ({
</
Td
>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
Td
verticalAlign=
"middle"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
<
AddressIcon
hash=
{
toData
.
hash
}
/>
<
AddressIcon
address=
{
toData
}
/>
<
AddressLink
hash=
{
toData
.
hash
}
alias=
{
toData
.
name
}
fontWeight=
"500"
ml=
{
2
}
/>
<
AddressLink
hash=
{
toData
.
hash
}
alias=
{
toData
.
name
}
fontWeight=
"500"
ml=
{
2
}
/>
</
Address
>
</
Address
>
</
Td
>
</
Td
>
...
...
ui/customAbi/CustomAbiTable/CustomAbiListItem.tsx
View file @
93521d44
...
@@ -24,7 +24,7 @@ const CustomAbiListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -24,7 +24,7 @@ const CustomAbiListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return
(
return
(
<
ListItemMobile
>
<
ListItemMobile
>
<
AddressSnippet
address=
{
item
.
contract_address
_hash
}
subtitle=
{
item
.
name
}
isContract
/>
<
AddressSnippet
address=
{
item
.
contract_address
}
subtitle=
{
item
.
name
}
/>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
</
ListItemMobile
>
</
ListItemMobile
>
);
);
...
...
ui/customAbi/CustomAbiTable/CustomAbiTableItem.tsx
View file @
93521d44
...
@@ -28,7 +28,7 @@ const CustomAbiTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -28,7 +28,7 @@ const CustomAbiTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return
(
return
(
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Td
>
<
Td
>
<
AddressSnippet
address=
{
item
.
contract_address
_hash
}
subtitle=
{
item
.
name
}
isContract
/>
<
AddressSnippet
address=
{
item
.
contract_address
}
subtitle=
{
item
.
name
}
/>
</
Td
>
</
Td
>
<
Td
>
<
Td
>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
...
...
ui/home/LatestTxsItem.tsx
View file @
93521d44
...
@@ -109,7 +109,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -109,7 +109,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
<
Box
width=
{
{
base
:
'
100%
'
,
lg
:
'
50%
'
}
}
>
<
Box
width=
{
{
base
:
'
100%
'
,
lg
:
'
50%
'
}
}
>
<
Flex
alignItems=
"center"
mb=
{
3
}
justifyContent=
{
{
base
:
'
start
'
,
lg
:
'
end
'
}
}
>
<
Flex
alignItems=
"center"
mb=
{
3
}
justifyContent=
{
{
base
:
'
start
'
,
lg
:
'
end
'
}
}
>
<
Address
>
<
Address
>
<
AddressIcon
hash=
{
tx
.
from
.
hash
}
/>
<
AddressIcon
address=
{
tx
.
from
}
/>
<
AddressLink
<
AddressLink
hash=
{
tx
.
from
.
hash
}
hash=
{
tx
.
from
.
hash
}
alias=
{
tx
.
from
.
name
}
alias=
{
tx
.
from
.
name
}
...
@@ -126,7 +126,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -126,7 +126,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
color=
"gray.500"
color=
"gray.500"
/>
/>
<
Address
>
<
Address
>
<
AddressIcon
hash=
{
dataTo
.
hash
}
/>
<
AddressIcon
address=
{
dataTo
}
/>
<
AddressLink
<
AddressLink
hash=
{
dataTo
.
hash
}
hash=
{
dataTo
.
hash
}
alias=
{
dataTo
.
name
}
alias=
{
dataTo
.
name
}
...
...
ui/privateTags/AddressTagTable/AddressTagListItem.tsx
View file @
93521d44
...
@@ -25,7 +25,7 @@ const AddressTagListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -25,7 +25,7 @@ const AddressTagListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return
(
return
(
<
ListItemMobile
>
<
ListItemMobile
>
<
Flex
alignItems=
"flex-start"
flexDirection=
"column"
maxW=
"100%"
>
<
Flex
alignItems=
"flex-start"
flexDirection=
"column"
maxW=
"100%"
>
<
AddressSnippet
address=
{
item
.
address
_hash
}
/>
<
AddressSnippet
address=
{
item
.
address
}
/>
<
HStack
spacing=
{
3
}
mt=
{
4
}
>
<
HStack
spacing=
{
3
}
mt=
{
4
}
>
<
Text
fontSize=
"sm"
fontWeight=
{
500
}
>
Private tag
</
Text
>
<
Text
fontSize=
"sm"
fontWeight=
{
500
}
>
Private tag
</
Text
>
<
Tag
>
<
Tag
>
...
...
ui/privateTags/AddressTagTable/AddressTagTableItem.tsx
View file @
93521d44
...
@@ -29,7 +29,7 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -29,7 +29,7 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return
(
return
(
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Td
>
<
Td
>
<
AddressSnippet
address=
{
item
.
address
_hash
}
/>
<
AddressSnippet
address=
{
item
.
address
}
/>
</
Td
>
</
Td
>
<
Td
whiteSpace=
"nowrap"
>
<
Td
whiteSpace=
"nowrap"
>
<
TruncatedTextTooltip
label=
{
item
.
name
}
>
<
TruncatedTextTooltip
label=
{
item
.
name
}
>
...
...
ui/publicTags/PublicTagTable/PublicTagListItem.tsx
View file @
93521d44
...
@@ -27,7 +27,7 @@ const PublicTagListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -27,7 +27,7 @@ const PublicTagListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
<
ListItemMobile
>
<
ListItemMobile
>
<
VStack
spacing=
{
3
}
alignItems=
"flex-start"
maxW=
"100%"
>
<
VStack
spacing=
{
3
}
alignItems=
"flex-start"
maxW=
"100%"
>
<
VStack
spacing=
{
4
}
alignItems=
"unset"
maxW=
"100%"
>
<
VStack
spacing=
{
4
}
alignItems=
"unset"
maxW=
"100%"
>
{
item
.
addresses
.
map
((
address
)
=>
<
AddressSnippet
key=
{
address
}
address=
{
address
}
/>)
}
{
item
.
addresses
_with_info
.
map
((
address
)
=>
<
AddressSnippet
key=
{
address
.
hash
}
address=
{
address
}
/>)
}
</
VStack
>
</
VStack
>
<
HStack
spacing=
{
3
}
>
<
HStack
spacing=
{
3
}
>
<
Text
fontSize=
"sm"
fontWeight=
{
500
}
>
Public tags
</
Text
>
<
Text
fontSize=
"sm"
fontWeight=
{
500
}
>
Public tags
</
Text
>
...
...
ui/publicTags/PublicTagTable/PublicTagTableItem.tsx
View file @
93521d44
...
@@ -32,7 +32,7 @@ const PublicTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -32,7 +32,7 @@ const PublicTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Td
>
<
Td
>
<
VStack
spacing=
{
4
}
alignItems=
"unset"
>
<
VStack
spacing=
{
4
}
alignItems=
"unset"
>
{
item
.
addresses
.
map
((
address
)
=>
<
AddressSnippet
key=
{
address
}
address=
{
address
}
/>)
}
{
item
.
addresses
_with_info
.
map
((
address
)
=>
<
AddressSnippet
key=
{
address
.
hash
}
address=
{
address
}
/>)
}
</
VStack
>
</
VStack
>
</
Td
>
</
Td
>
<
Td
>
<
Td
>
...
...
ui/shared/AddressSnippet.tsx
View file @
93521d44
import
{
Text
,
Box
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
AddressParam
}
from
'
types/api/addressParams
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
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
'
;
import
AddressContractIcon
from
'
./address/AddressContractIcon
'
;
interface
Props
{
interface
Props
{
address
:
string
;
address
:
AddressParam
;
subtitle
?:
string
;
subtitle
?:
string
;
// temporary solution for custom abis while we don't have address info on account pages
isContract
?:
boolean
;
}
}
const
AddressSnippet
=
({
address
,
isContract
,
subtitle
}:
Props
)
=>
{
const
AddressSnippet
=
({
address
,
subtitle
}:
Props
)
=>
{
return
(
return
(
<
Box
maxW=
"100%"
>
<
Box
maxW=
"100%"
>
<
Address
>
<
Address
>
{
isContract
?
<
AddressContractIcon
/>
:
<
AddressIcon
hash=
{
address
}
/>
}
<
AddressIcon
address=
{
address
}
/>
<
AddressLink
hash=
{
address
}
fontWeight=
"600"
ml=
{
2
}
/>
<
AddressLink
hash=
{
address
.
hash
}
fontWeight=
"600"
ml=
{
2
}
/>
<
CopyToClipboard
text=
{
address
}
ml=
{
1
}
/>
<
CopyToClipboard
text=
{
address
.
hash
}
ml=
{
1
}
/>
</
Address
>
</
Address
>
{
subtitle
&&
<
Text
fontSize=
"sm"
variant=
"secondary"
mt=
{
0.5
}
ml=
{
8
}
>
{
subtitle
}
</
Text
>
}
{
subtitle
&&
<
Text
fontSize=
"sm"
variant=
"secondary"
mt=
{
0.5
}
ml=
{
8
}
>
{
subtitle
}
</
Text
>
}
</
Box
>
</
Box
>
...
...
ui/shared/TokenTransfer/TokenTransferListItem.tsx
View file @
93521d44
...
@@ -80,7 +80,7 @@ const TokenTransferListItem = ({
...
@@ -80,7 +80,7 @@ const TokenTransferListItem = ({
)
}
)
}
<
Flex
w=
"100%"
columnGap=
{
3
}
>
<
Flex
w=
"100%"
columnGap=
{
3
}
>
<
Address
width=
{
addressWidth
}
>
<
Address
width=
{
addressWidth
}
>
<
AddressIcon
hash=
{
from
.
hash
}
/>
<
AddressIcon
address=
{
from
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
/>
</
Address
>
</
Address
>
{
baseAddress
?
{
baseAddress
?
...
@@ -88,7 +88,7 @@ const TokenTransferListItem = ({
...
@@ -88,7 +88,7 @@ const TokenTransferListItem = ({
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
color=
"gray.500"
/>
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
color=
"gray.500"
/>
}
}
<
Address
width=
{
addressWidth
}
>
<
Address
width=
{
addressWidth
}
>
<
AddressIcon
hash=
{
to
.
hash
}
/>
<
AddressIcon
address=
{
to
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
to
.
hash
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
to
.
hash
}
/>
</
Address
>
</
Address
>
</
Flex
>
</
Flex
>
...
...
ui/shared/TokenTransfer/TokenTransferTableItem.tsx
View file @
93521d44
...
@@ -69,7 +69,7 @@ const TokenTransferTableItem = ({
...
@@ -69,7 +69,7 @@ const TokenTransferTableItem = ({
)
}
)
}
<
Td
>
<
Td
>
<
Address
display=
"inline-flex"
maxW=
"100%"
lineHeight=
"30px"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
lineHeight=
"30px"
>
<
AddressIcon
hash=
{
from
.
hash
}
/>
<
AddressIcon
address=
{
from
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
alias=
{
from
.
name
}
flexGrow=
{
1
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
alias=
{
from
.
name
}
flexGrow=
{
1
}
/>
</
Address
>
</
Address
>
</
Td
>
</
Td
>
...
@@ -80,7 +80,7 @@ const TokenTransferTableItem = ({
...
@@ -80,7 +80,7 @@ const TokenTransferTableItem = ({
)
}
)
}
<
Td
>
<
Td
>
<
Address
display=
"inline-flex"
maxW=
"100%"
lineHeight=
"30px"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
lineHeight=
"30px"
>
<
AddressIcon
hash=
{
to
.
hash
}
/>
<
AddressIcon
address=
{
to
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
to
.
hash
}
alias=
{
to
.
name
}
flexGrow=
{
1
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
to
.
hash
}
alias=
{
to
.
name
}
flexGrow=
{
1
}
/>
</
Address
>
</
Address
>
</
Td
>
</
Td
>
...
...
ui/shared/address/AddressIcon.tsx
View file @
93521d44
...
@@ -2,10 +2,25 @@ import { Box, chakra } from '@chakra-ui/react';
...
@@ -2,10 +2,25 @@ import { Box, chakra } from '@chakra-ui/react';
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
Jazzicon
,
{
jsNumberForAddress
}
from
'
react-jazzicon
'
;
import
Jazzicon
,
{
jsNumberForAddress
}
from
'
react-jazzicon
'
;
const
AddressIcon
=
({
hash
,
className
}:
{
hash
:
string
;
className
?:
string
})
=>
{
import
type
{
AddressParam
}
from
'
types/api/addressParams
'
;
import
AddressContractIcon
from
'
ui/shared/address/AddressContractIcon
'
;
type
Props
=
{
address
:
AddressParam
;
className
?:
string
;
}
const
AddressIcon
=
({
address
,
className
}:
Props
)
=>
{
if
(
address
.
is_contract
)
{
return
(
<
AddressContractIcon
/>
);
}
return
(
return
(
<
Box
className=
{
className
}
width=
"24px"
display=
"inline-flex"
>
<
Box
className=
{
className
}
width=
"24px"
display=
"inline-flex"
>
<
Jazzicon
diameter=
{
24
}
seed=
{
jsNumberForAddress
(
hash
)
}
/>
<
Jazzicon
diameter=
{
24
}
seed=
{
jsNumberForAddress
(
address
.
hash
)
}
/>
</
Box
>
</
Box
>
);
);
};
};
...
...
ui/tx/TxDetails.tsx
View file @
93521d44
...
@@ -147,7 +147,7 @@ const TxDetails = () => {
...
@@ -147,7 +147,7 @@ const TxDetails = () => {
columnGap=
{
3
}
columnGap=
{
3
}
>
>
<
Address
>
<
Address
>
<
AddressIcon
hash=
{
data
.
from
.
hash
}
/>
<
AddressIcon
address=
{
data
.
from
}
/>
<
AddressLink
ml=
{
2
}
hash=
{
data
.
from
.
hash
}
/>
<
AddressLink
ml=
{
2
}
hash=
{
data
.
from
.
hash
}
/>
<
CopyToClipboard
text=
{
data
.
from
.
hash
}
/>
<
CopyToClipboard
text=
{
data
.
from
.
hash
}
/>
</
Address
>
</
Address
>
...
@@ -166,7 +166,7 @@ const TxDetails = () => {
...
@@ -166,7 +166,7 @@ const TxDetails = () => {
>
>
{
data
.
to
&&
data
.
to
.
hash
?
(
{
data
.
to
&&
data
.
to
.
hash
?
(
<
Address
alignItems=
"center"
>
<
Address
alignItems=
"center"
>
<
AddressIcon
hash=
{
toAddress
.
hash
}
/>
<
AddressIcon
address=
{
toAddress
}
/>
<
AddressLink
ml=
{
2
}
hash=
{
toAddress
.
hash
}
/>
<
AddressLink
ml=
{
2
}
hash=
{
toAddress
.
hash
}
/>
{
executionSuccessBadge
}
{
executionSuccessBadge
}
{
executionFailedBadge
}
{
executionFailedBadge
}
...
...
ui/tx/internals/TxInternalsListItem.tsx
View file @
93521d44
...
@@ -27,12 +27,12 @@ const TxInternalsListItem = ({ type, from, to, value, success, error, gas_limit:
...
@@ -27,12 +27,12 @@ const TxInternalsListItem = ({ type, from, to, value, success, error, gas_limit:
</
Flex
>
</
Flex
>
<
Box
w=
"100%"
display=
"flex"
columnGap=
{
3
}
>
<
Box
w=
"100%"
display=
"flex"
columnGap=
{
3
}
>
<
Address
width=
"calc((100% - 48px) / 2)"
>
<
Address
width=
"calc((100% - 48px) / 2)"
>
<
AddressIcon
hash=
{
from
.
hash
}
/>
<
AddressIcon
address=
{
from
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
/>
</
Address
>
</
Address
>
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
color=
"gray.500"
/>
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
color=
"gray.500"
/>
<
Address
width=
"calc((100% - 48px) / 2)"
>
<
Address
width=
"calc((100% - 48px) / 2)"
>
<
AddressIcon
hash=
{
toData
.
hash
}
/>
<
AddressIcon
address=
{
toData
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
toData
.
hash
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
toData
.
hash
}
/>
</
Address
>
</
Address
>
</
Box
>
</
Box
>
...
...
ui/tx/internals/TxInternalsTableItem.tsx
View file @
93521d44
...
@@ -32,7 +32,7 @@ const TxInternalTableItem = ({ type, from, to, value, success, error, gas_limit:
...
@@ -32,7 +32,7 @@ const TxInternalTableItem = ({ type, from, to, value, success, error, gas_limit:
</
Td
>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
Td
verticalAlign=
"middle"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
<
AddressIcon
hash=
{
from
.
hash
}
/>
<
AddressIcon
address=
{
from
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
alias=
{
from
.
name
}
flexGrow=
{
1
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
.
hash
}
alias=
{
from
.
name
}
flexGrow=
{
1
}
/>
</
Address
>
</
Address
>
</
Td
>
</
Td
>
...
@@ -41,7 +41,7 @@ const TxInternalTableItem = ({ type, from, to, value, success, error, gas_limit:
...
@@ -41,7 +41,7 @@ const TxInternalTableItem = ({ type, from, to, value, success, error, gas_limit:
</
Td
>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
Td
verticalAlign=
"middle"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
<
Address
display=
"inline-flex"
maxW=
"100%"
>
<
AddressIcon
hash=
{
toData
.
hash
}
/>
<
AddressIcon
address=
{
toData
}
/>
<
AddressLink
hash=
{
toData
.
hash
}
alias=
{
toData
.
name
}
fontWeight=
"500"
ml=
{
2
}
/>
<
AddressLink
hash=
{
toData
.
hash
}
alias=
{
toData
.
name
}
fontWeight=
"500"
ml=
{
2
}
/>
</
Address
>
</
Address
>
</
Td
>
</
Td
>
...
...
ui/tx/logs/TxLogItem.tsx
View file @
93521d44
...
@@ -50,7 +50,7 @@ const TxLogItem = ({ address, index, topics, data, decoded }: Props) => {
...
@@ -50,7 +50,7 @@ const TxLogItem = ({ address, index, topics, data, decoded }: Props) => {
<
RowHeader
>
Address
</
RowHeader
>
<
RowHeader
>
Address
</
RowHeader
>
<
GridItem
display=
"flex"
alignItems=
"center"
>
<
GridItem
display=
"flex"
alignItems=
"center"
>
<
Address
mr=
{
{
base
:
9
,
lg
:
0
}
}
>
<
Address
mr=
{
{
base
:
9
,
lg
:
0
}
}
>
<
AddressIcon
hash=
{
address
.
hash
}
/>
<
AddressIcon
address=
{
address
}
/>
<
AddressLink
hash=
{
address
.
hash
}
alias=
{
address
.
name
}
ml=
{
2
}
/>
<
AddressLink
hash=
{
address
.
hash
}
alias=
{
address
.
name
}
ml=
{
2
}
/>
</
Address
>
</
Address
>
{
/* api doesn't have find topic feature yet */
}
{
/* api doesn't have find topic feature yet */
}
...
...
ui/tx/state/TxStateListItem.tsx
View file @
93521d44
...
@@ -9,7 +9,7 @@ import type { data } from 'data/txState';
...
@@ -9,7 +9,7 @@ import type { data } from 'data/txState';
import
{
nbsp
}
from
'
lib/html-entities
'
;
import
{
nbsp
}
from
'
lib/html-entities
'
;
import
getNetworkValidatorTitle
from
'
lib/networks/getNetworkValidatorTitle
'
;
import
getNetworkValidatorTitle
from
'
lib/networks/getNetworkValidatorTitle
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
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
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
...
@@ -51,7 +51,8 @@ const TxStateListItem = ({ storage, address, miner, after, before, diff }: Props
...
@@ -51,7 +51,8 @@ const TxStateListItem = ({ storage, address, miner, after, before, diff }: Props
<
AccordionIcon
color=
"blue.600"
width=
"30px"
/>
<
AccordionIcon
color=
"blue.600"
width=
"30px"
/>
</
AccordionButton
>
</
AccordionButton
>
<
Address
flexGrow=
{
1
}
>
<
Address
flexGrow=
{
1
}
>
<
AddressIcon
hash=
{
address
}
/>
{
/* ??? */
}
{
/* <AddressIcon hash={ address }/> */
}
<
AddressLink
hash=
{
address
}
ml=
{
2
}
/>
<
AddressLink
hash=
{
address
}
ml=
{
2
}
/>
</
Address
>
</
Address
>
</
Flex
>
</
Flex
>
...
...
ui/tx/state/TxStateTableItem.tsx
View file @
93521d44
...
@@ -18,7 +18,7 @@ import React, { useRef } from 'react';
...
@@ -18,7 +18,7 @@ import React, { useRef } from 'react';
import
type
{
TTxStateItem
}
from
'
data/txState
'
;
import
type
{
TTxStateItem
}
from
'
data/txState
'
;
import
{
nbsp
}
from
'
lib/html-entities
'
;
import
{
nbsp
}
from
'
lib/html-entities
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
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
TxStateStorageItem
from
'
./TxStateStorageItem
'
;
import
TxStateStorageItem
from
'
./TxStateStorageItem
'
;
...
@@ -58,7 +58,8 @@ const TxStateTableItem = ({ txStateItem }: { txStateItem: TTxStateItem }) => {
...
@@ -58,7 +58,8 @@ const TxStateTableItem = ({ txStateItem }: { txStateItem: TTxStateItem }) => {
</
Td
>
</
Td
>
<
Td
border=
{
0
}
>
<
Td
border=
{
0
}
>
<
Address
height=
"30px"
>
<
Address
height=
"30px"
>
<
AddressIcon
hash=
{
txStateItem
.
address
}
/>
{
/* ??? */
}
{
/* <AddressIcon hash={ txStateItem.address }/> */
}
<
AddressLink
hash=
{
txStateItem
.
address
}
fontWeight=
"500"
truncation=
"constant"
ml=
{
2
}
/>
<
AddressLink
hash=
{
txStateItem
.
address
}
fontWeight=
"500"
truncation=
"constant"
ml=
{
2
}
/>
</
Address
>
</
Address
>
</
Td
>
</
Td
>
...
...
ui/txs/TxsListItem.tsx
View file @
93521d44
...
@@ -102,7 +102,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
...
@@ -102,7 +102,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
)
}
)
}
<
Flex
alignItems=
"center"
height=
{
6
}
mt=
{
6
}
>
<
Flex
alignItems=
"center"
height=
{
6
}
mt=
{
6
}
>
<
Address
width=
{
`calc((100%-${ currentAddress ? TAG_WIDTH : ARROW_WIDTH + 8 }px)/2)`
}
>
<
Address
width=
{
`calc((100%-${ currentAddress ? TAG_WIDTH : ARROW_WIDTH + 8 }px)/2)`
}
>
<
AddressIcon
hash=
{
tx
.
from
.
hash
}
/>
<
AddressIcon
address=
{
tx
.
from
}
/>
<
AddressLink
<
AddressLink
hash=
{
tx
.
from
.
hash
}
hash=
{
tx
.
from
.
hash
}
alias=
{
tx
.
from
.
name
}
alias=
{
tx
.
from
.
name
}
...
@@ -120,7 +120,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
...
@@ -120,7 +120,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
/>
/>
)
}
)
}
<
Address
width=
"calc((100%-40px)/2)"
>
<
Address
width=
"calc((100%-40px)/2)"
>
<
AddressIcon
hash=
{
dataTo
.
hash
}
/>
<
AddressIcon
address=
{
dataTo
}
/>
<
AddressLink
<
AddressLink
hash=
{
dataTo
.
hash
}
hash=
{
dataTo
.
hash
}
alias=
{
dataTo
.
name
}
alias=
{
dataTo
.
name
}
...
...
ui/txs/TxsTableItem.tsx
View file @
93521d44
...
@@ -51,7 +51,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
...
@@ -51,7 +51,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
const
addressFrom
=
(
const
addressFrom
=
(
<
Address
>
<
Address
>
<
Tooltip
label=
{
tx
.
from
.
implementation_name
}
>
<
Tooltip
label=
{
tx
.
from
.
implementation_name
}
>
<
Box
display=
"flex"
><
AddressIcon
hash=
{
tx
.
from
.
hash
}
/></
Box
>
<
Box
display=
"flex"
><
AddressIcon
address=
{
tx
.
from
}
/></
Box
>
</
Tooltip
>
</
Tooltip
>
<
AddressLink
hash=
{
tx
.
from
.
hash
}
alias=
{
tx
.
from
.
name
}
fontWeight=
"500"
ml=
{
2
}
truncation=
"constant"
/>
<
AddressLink
hash=
{
tx
.
from
.
hash
}
alias=
{
tx
.
from
.
name
}
fontWeight=
"500"
ml=
{
2
}
truncation=
"constant"
/>
</
Address
>
</
Address
>
...
@@ -62,7 +62,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
...
@@ -62,7 +62,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
const
addressTo
=
(
const
addressTo
=
(
<
Address
>
<
Address
>
<
Tooltip
label=
{
dataTo
.
implementation_name
}
>
<
Tooltip
label=
{
dataTo
.
implementation_name
}
>
<
Box
display=
"flex"
><
AddressIcon
hash=
{
dataTo
.
hash
}
/></
Box
>
<
Box
display=
"flex"
><
AddressIcon
address=
{
dataTo
}
/></
Box
>
</
Tooltip
>
</
Tooltip
>
<
AddressLink
hash=
{
dataTo
.
hash
}
alias=
{
dataTo
.
name
}
fontWeight=
"500"
ml=
{
2
}
truncation=
"constant"
/>
<
AddressLink
hash=
{
dataTo
.
hash
}
alias=
{
dataTo
.
name
}
fontWeight=
"500"
ml=
{
2
}
truncation=
"constant"
/>
</
Address
>
</
Address
>
...
...
ui/watchlist/WatchlistTable/WatchListAddressItem.tsx
View file @
93521d44
...
@@ -16,7 +16,7 @@ const WatchListAddressItem = ({ item }: {item: TWatchlistItem}) => {
...
@@ -16,7 +16,7 @@ const WatchListAddressItem = ({ item }: {item: TWatchlistItem}) => {
return
(
return
(
<
VStack
spacing=
{
2
}
align=
"stretch"
fontWeight=
{
500
}
>
<
VStack
spacing=
{
2
}
align=
"stretch"
fontWeight=
{
500
}
>
<
AddressSnippet
address=
{
item
.
address
_hash
}
/>
<
AddressSnippet
address=
{
item
.
address
}
/>
<
Flex
fontSize=
"sm"
h=
{
6
}
pl=
{
infoItemsPaddingLeft
}
flexWrap=
"wrap"
alignItems=
"center"
rowGap=
{
1
}
>
<
Flex
fontSize=
"sm"
h=
{
6
}
pl=
{
infoItemsPaddingLeft
}
flexWrap=
"wrap"
alignItems=
"center"
rowGap=
{
1
}
>
{
appConfig
.
network
.
currency
.
address
&&
(
{
appConfig
.
network
.
currency
.
address
&&
(
<
TokenLogo
<
TokenLogo
...
...
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