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
7cebfd81
Commit
7cebfd81
authored
Sep 14, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review fixes
parent
be2ce560
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
83 additions
and
108 deletions
+83
-108
AddressSnippet.tsx
ui/shared/AddressSnippet.tsx
+3
-6
CopyToClipboard.tsx
ui/shared/CopyToClipboard.tsx
+1
-1
HashStringShorten.tsx
ui/shared/HashStringShorten.tsx
+2
-2
HashStringShortenDynamic.tsx
ui/shared/HashStringShortenDynamic.tsx
+2
-2
TransactionSnippet.tsx
ui/shared/TransactionSnippet.tsx
+3
-6
Address.tsx
ui/shared/address/Address.tsx
+2
-11
AddressIcon.tsx
ui/shared/address/AddressIcon.tsx
+2
-2
AddressLink.tsx
ui/shared/address/AddressLink.tsx
+32
-15
TokenTransfer.tsx
ui/tx/TokenTransfer.tsx
+2
-7
TxDecodedInputData.tsx
ui/tx/TxDecodedInputData.tsx
+6
-11
TxDetails.tsx
ui/tx/TxDetails.tsx
+8
-13
TxInternalsTableItem.tsx
ui/tx/internals/TxInternalsTableItem.tsx
+10
-19
TxLogItem.tsx
ui/tx/logs/TxLogItem.tsx
+3
-6
TxStateTableItem.tsx
ui/tx/state/TxStateTableItem.tsx
+7
-7
No files found.
ui/shared/AddressSnippet.tsx
View file @
7cebfd81
...
@@ -5,7 +5,6 @@ import Address from 'ui/shared/address/Address';
...
@@ -5,7 +5,6 @@ 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
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
interface
Props
{
interface
Props
{
address
:
string
;
address
:
string
;
...
@@ -15,12 +14,10 @@ interface Props {
...
@@ -15,12 +14,10 @@ interface Props {
const
AddressSnippet
=
({
address
,
subtitle
}:
Props
)
=>
{
const
AddressSnippet
=
({
address
,
subtitle
}:
Props
)
=>
{
return
(
return
(
<
Box
maxW=
"100%"
>
<
Box
maxW=
"100%"
>
<
Address
hash=
{
address
}
>
<
Address
>
<
AddressIcon
hash=
{
address
}
/>
<
AddressIcon
hash=
{
address
}
/>
<
AddressLink
fontWeight=
"600"
ml=
{
2
}
>
<
AddressLink
hash=
{
address
}
fontWeight=
"600"
ml=
{
2
}
/>
<
HashStringShortenDynamic
fontWeight=
"600"
/>
<
CopyToClipboard
text=
{
address
}
ml=
{
1
}
/>
</
AddressLink
>
<
CopyToClipboard
ml=
{
1
}
/>
</
Address
>
</
Address
>
{
subtitle
&&
<
Text
fontSize=
"sm"
variant=
"secondary"
mt=
{
0.5
}
ml=
{
{
base
:
0
,
lg
:
8
}
}
>
{
subtitle
}
</
Text
>
}
{
subtitle
&&
<
Text
fontSize=
"sm"
variant=
"secondary"
mt=
{
0.5
}
ml=
{
{
base
:
0
,
lg
:
8
}
}
>
{
subtitle
}
</
Text
>
}
</
Box
>
</
Box
>
...
...
ui/shared/CopyToClipboard.tsx
View file @
7cebfd81
...
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
...
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
import
CopyIcon
from
'
icons/copy.svg
'
;
import
CopyIcon
from
'
icons/copy.svg
'
;
const
CopyToClipboard
=
({
text
=
''
,
className
}:
{
text
?
:
string
;
className
?:
string
})
=>
{
const
CopyToClipboard
=
({
text
,
className
}:
{
text
:
string
;
className
?:
string
})
=>
{
const
{
hasCopied
,
onCopy
}
=
useClipboard
(
text
,
3000
);
const
{
hasCopied
,
onCopy
}
=
useClipboard
(
text
,
3000
);
const
[
copied
,
setCopied
]
=
useState
(
false
);
const
[
copied
,
setCopied
]
=
useState
(
false
);
...
...
ui/shared/HashStringShorten.tsx
View file @
7cebfd81
...
@@ -2,10 +2,10 @@ import { Tooltip } from '@chakra-ui/react';
...
@@ -2,10 +2,10 @@ import { Tooltip } from '@chakra-ui/react';
import
React
from
'
react
'
;
import
React
from
'
react
'
;
interface
Props
{
interface
Props
{
hash
?
:
string
;
hash
:
string
;
}
}
const
HashStringShorten
=
({
hash
=
''
}:
Props
)
=>
{
const
HashStringShorten
=
({
hash
}:
Props
)
=>
{
return
(
return
(
<
Tooltip
label=
{
hash
}
>
<
Tooltip
label=
{
hash
}
>
{
hash
.
slice
(
0
,
4
)
+
'
...
'
+
hash
.
slice
(
-
4
)
}
{
hash
.
slice
(
0
,
4
)
+
'
...
'
+
hash
.
slice
(
-
4
)
}
...
...
ui/shared/HashStringShortenDynamic.tsx
View file @
7cebfd81
...
@@ -20,11 +20,11 @@ const TAIL_LENGTH = 4;
...
@@ -20,11 +20,11 @@ const TAIL_LENGTH = 4;
const
HEAD_MIN_LENGTH
=
4
;
const
HEAD_MIN_LENGTH
=
4
;
interface
Props
{
interface
Props
{
hash
?
:
string
;
hash
:
string
;
fontWeight
?:
string
|
number
;
fontWeight
?:
string
|
number
;
}
}
const
HashStringShortenDynamic
=
({
hash
=
''
,
fontWeight
=
'
400
'
}:
Props
)
=>
{
const
HashStringShortenDynamic
=
({
hash
,
fontWeight
=
'
400
'
}:
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/TransactionSnippet.tsx
View file @
7cebfd81
...
@@ -5,7 +5,6 @@ import transactionIcon from 'icons/transactions.svg';
...
@@ -5,7 +5,6 @@ import transactionIcon from 'icons/transactions.svg';
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
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
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
interface
Props
{
interface
Props
{
hash
:
string
;
hash
:
string
;
...
@@ -13,12 +12,10 @@ interface Props {
...
@@ -13,12 +12,10 @@ interface Props {
const
TransactionSnippet
=
({
hash
}:
Props
)
=>
{
const
TransactionSnippet
=
({
hash
}:
Props
)
=>
{
return
(
return
(
<
Address
hash=
{
hash
}
maxW=
"100%"
>
<
Address
maxW=
"100%"
>
<
Icon
as=
{
transactionIcon
}
boxSize=
{
6
}
color=
{
useColorModeValue
(
'
gray.500
'
,
'
gray.400
'
)
}
/>
<
Icon
as=
{
transactionIcon
}
boxSize=
{
6
}
color=
{
useColorModeValue
(
'
gray.500
'
,
'
gray.400
'
)
}
/>
<
AddressLink
fontWeight=
"600"
type=
"transaction"
ml=
{
2
}
>
<
AddressLink
hash=
{
hash
}
fontWeight=
"600"
type=
"transaction"
ml=
{
2
}
/>
<
HashStringShortenDynamic
fontWeight=
"600"
/>
<
CopyToClipboard
text=
{
hash
}
ml=
{
1
}
/>
</
AddressLink
>
<
CopyToClipboard
ml=
{
1
}
/>
</
Address
>
</
Address
>
);
);
};
};
...
...
ui/shared/address/Address.tsx
View file @
7cebfd81
...
@@ -2,21 +2,12 @@ import { Flex, chakra } from '@chakra-ui/react';
...
@@ -2,21 +2,12 @@ import { Flex, chakra } from '@chakra-ui/react';
import
React
from
'
react
'
;
import
React
from
'
react
'
;
interface
Props
{
interface
Props
{
hash
:
string
;
className
?:
string
;
className
?:
string
;
children
:
React
.
ReactNode
;
children
:
React
.
ReactNode
;
}
}
const
Address
=
({
children
,
className
,
...
props
}:
Props
)
=>
{
const
Address
=
({
children
,
className
}:
Props
)
=>
{
const
childrenWithProps
=
React
.
Children
.
map
(
children
,
(
child
)
=>
{
return
<
Flex
alignItems=
"center"
overflow=
"hidden"
className=
{
className
}
>
{
children
}
</
Flex
>;
if
(
React
.
isValidElement
(
child
))
{
return
React
.
cloneElement
(
child
,
{
...
props
,
text
:
props
.
hash
}
as
Partial
<
unknown
>
);
}
return
child
;
});
return
<
Flex
alignItems=
"center"
overflow=
"hidden"
className=
{
className
}
>
{
childrenWithProps
}
</
Flex
>;
};
};
const
AddressChakra
=
chakra
(
Address
);
const
AddressChakra
=
chakra
(
Address
);
...
...
ui/shared/address/AddressIcon.tsx
View file @
7cebfd81
...
@@ -2,10 +2,10 @@ import { Box, chakra } from '@chakra-ui/react';
...
@@ -2,10 +2,10 @@ 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
})
=>
{
const
AddressIcon
=
({
hash
,
className
}:
{
hash
:
string
;
className
?:
string
})
=>
{
return
(
return
(
<
Box
className=
{
className
}
width=
"24px"
display=
"inline-flex"
>
<
Box
className=
{
className
}
width=
"24px"
display=
"inline-flex"
>
<
Jazzicon
diameter=
{
24
}
seed=
{
jsNumberForAddress
(
hash
||
'
random
'
)
}
/>
<
Jazzicon
diameter=
{
24
}
seed=
{
jsNumberForAddress
(
hash
)
}
/>
</
Box
>
</
Box
>
);
);
};
};
...
...
ui/shared/address/AddressLink.tsx
View file @
7cebfd81
import
{
Link
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Link
,
chakra
,
shouldForwardProp
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useLink
from
'
lib/link/useLink
'
;
import
useLink
from
'
lib/link/useLink
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
interface
Props
{
interface
Props
{
children
:
React
.
ReactNode
;
type
?:
'
address
'
|
'
transaction
'
|
'
token
'
;
type
?:
'
address
'
|
'
transaction
'
|
'
token
'
;
hash
?:
string
;
className
?:
string
;
className
?:
string
;
hash
:
string
;
truncation
?:
'
constant
'
|
'
dynamic
'
|
'
none
'
;
fontWeight
?:
string
;
}
}
const
AddressLink
=
({
children
,
type
,
className
,
...
props
}:
Props
)
=>
{
const
AddressLink
=
({
type
,
className
,
truncation
=
'
dynamic
'
,
hash
,
fontWeight
}:
Props
)
=>
{
const
link
=
useLink
();
const
link
=
useLink
();
let
url
;
let
url
;
if
(
type
===
'
transaction
'
)
{
if
(
type
===
'
transaction
'
)
{
url
=
link
(
'
tx_index
'
,
{
id
:
props
.
hash
});
url
=
link
(
'
tx_index
'
,
{
id
:
hash
});
}
else
if
(
type
===
'
token
'
)
{
}
else
if
(
type
===
'
token
'
)
{
url
=
link
(
'
token_index
'
,
{
id
:
props
.
hash
});
url
=
link
(
'
token_index
'
,
{
id
:
hash
});
}
else
{
}
else
{
url
=
link
(
'
address_index
'
,
{
id
:
props
.
hash
});
url
=
link
(
'
address_index
'
,
{
id
:
hash
});
}
}
const
childrenWithProps
=
React
.
Children
.
map
(
children
,
child
=>
{
const
content
=
(()
=>
{
if
(
React
.
isValidElement
(
child
))
{
switch
(
truncation
)
{
return
React
.
cloneElement
(
child
,
{
...
props
});
case
'
constant
'
:
return
<
HashStringShorten
hash=
{
hash
}
/>;
case
'
dynamic
'
:
return
<
HashStringShortenDynamic
hash=
{
hash
}
fontWeight=
{
fontWeight
}
/>;
case
'
none
'
:
return
<
span
>
{
hash
}
</
span
>;
}
}
})();
return
child
;
});
return
(
return
(
<
Link
<
Link
...
@@ -37,11 +43,22 @@ const AddressLink = ({ children, type, className, ...props }: Props) => {
...
@@ -37,11 +43,22 @@ const AddressLink = ({ children, type, className, ...props }: Props) => {
overflow=
"hidden"
overflow=
"hidden"
whiteSpace=
"nowrap"
whiteSpace=
"nowrap"
>
>
{
c
hildrenWithProps
}
{
c
ontent
}
</
Link
>
</
Link
>
);
);
};
};
const
AddressLinkChakra
=
chakra
(
AddressLink
);
const
AddressLinkChakra
=
chakra
(
AddressLink
,
{
shouldForwardProp
:
(
prop
)
=>
{
const
isChakraProp
=
!
shouldForwardProp
(
prop
);
// forward fontWeight to the AddressLink since it's needed for underlying HashStringShortenDynamic component
if
(
isChakraProp
&&
prop
!==
'
fontWeight
'
)
{
return
false
;
}
return
true
;
},
});
export
default
React
.
memo
(
AddressLinkChakra
);
export
default
React
.
memo
(
AddressLinkChakra
);
ui/tx/TokenTransfer.tsx
View file @
7cebfd81
...
@@ -4,7 +4,6 @@ import React from 'react';
...
@@ -4,7 +4,6 @@ import React from 'react';
import
rightArrowIcon
from
'
icons/arrows/right.svg
'
;
import
rightArrowIcon
from
'
icons/arrows/right.svg
'
;
import
{
space
}
from
'
lib/html-entities
'
;
import
{
space
}
from
'
lib/html-entities
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
Token
from
'
ui/shared/Token
'
;
import
Token
from
'
ui/shared/Token
'
;
interface
Props
{
interface
Props
{
...
@@ -18,13 +17,9 @@ interface Props {
...
@@ -18,13 +17,9 @@ interface Props {
const
TokenTransfer
=
({
from
,
to
,
amount
,
usd
,
token
}:
Props
)
=>
{
const
TokenTransfer
=
({
from
,
to
,
amount
,
usd
,
token
}:
Props
)
=>
{
return
(
return
(
<
Center
>
<
Center
>
<
AddressLink
fontWeight=
"500"
hash=
{
from
}
>
<
AddressLink
fontWeight=
"500"
hash=
{
from
}
truncation=
"constant"
/>
<
HashStringShorten
/>
</
AddressLink
>
<
Icon
as=
{
rightArrowIcon
}
boxSize=
{
6
}
mx=
{
2
}
color=
"gray.500"
/>
<
Icon
as=
{
rightArrowIcon
}
boxSize=
{
6
}
mx=
{
2
}
color=
"gray.500"
/>
<
AddressLink
fontWeight=
"500"
hash=
{
to
}
>
<
AddressLink
fontWeight=
"500"
hash=
{
to
}
truncation=
"constant"
/>
<
HashStringShorten
/>
</
AddressLink
>
<
Text
fontWeight=
{
500
}
as=
"span"
ml=
{
4
}
>
For:
{
space
}
<
Text
fontWeight=
{
500
}
as=
"span"
ml=
{
4
}
>
For:
{
space
}
<
Text
fontWeight=
{
600
}
as=
"span"
>
{
amount
}
</
Text
>
{
space
}
<
Text
fontWeight=
{
600
}
as=
"span"
>
{
amount
}
</
Text
>
{
space
}
<
Text
fontWeight=
{
400
}
variant=
"secondary"
as=
"span"
>
($
{
usd
.
toFixed
(
2
)
}
)
</
Text
>
<
Text
fontWeight=
{
400
}
variant=
"secondary"
as=
"span"
>
($
{
usd
.
toFixed
(
2
)
}
)
</
Text
>
...
...
ui/tx/TxDecodedInputData.tsx
View file @
7cebfd81
...
@@ -4,7 +4,6 @@ import React from 'react';
...
@@ -4,7 +4,6 @@ import React from 'react';
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
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
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
interface
RowProps
{
interface
RowProps
{
children
:
React
.
ReactNode
;
children
:
React
.
ReactNode
;
...
@@ -111,19 +110,15 @@ const TxDecodedInputData = () => {
...
@@ -111,19 +110,15 @@ const TxDecodedInputData = () => {
Data
Data
</
GridItem
>
</
GridItem
>
<
TableRow
name=
"from"
type=
"address"
>
<
TableRow
name=
"from"
type=
"address"
>
<
Address
hash=
"0x0000000000000000000000000000000000000000"
justifyContent=
"space-between"
>
<
Address
justifyContent=
"space-between"
>
<
AddressLink
>
<
AddressLink
hash=
"0x0000000000000000000000000000000000000000"
/>
<
HashStringShortenDynamic
/>
<
CopyToClipboard
text=
"0x0000000000000000000000000000000000000000"
/>
</
AddressLink
>
<
CopyToClipboard
/>
</
Address
>
</
Address
>
</
TableRow
>
</
TableRow
>
<
TableRow
name=
"from"
type=
"address"
>
<
TableRow
name=
"from"
type=
"address"
>
<
Address
hash=
"0xcf0c50b7ea8af37d57380a0ac199d55b0782c718"
justifyContent=
"space-between"
>
<
Address
justifyContent=
"space-between"
>
<
AddressLink
>
<
AddressLink
hash=
"0xcf0c50b7ea8af37d57380a0ac199d55b0782c718"
/>
<
HashStringShortenDynamic
/>
<
CopyToClipboard
text=
"0xcf0c50b7ea8af37d57380a0ac199d55b0782c718"
/>
</
AddressLink
>
<
CopyToClipboard
/>
</
Address
>
</
Address
>
</
TableRow
>
</
TableRow
>
<
TableRow
name=
"tokenId"
type=
"uint256"
isLast
>
<
TableRow
name=
"tokenId"
type=
"uint256"
isLast
>
...
...
ui/tx/TxDetails.tsx
View file @
7cebfd81
...
@@ -12,7 +12,6 @@ import AddressIcon from 'ui/shared/address/AddressIcon';
...
@@ -12,7 +12,6 @@ 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
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
RawInputData
from
'
ui/shared/RawInputData
'
;
import
RawInputData
from
'
ui/shared/RawInputData
'
;
import
Token
from
'
ui/shared/Token
'
;
import
Token
from
'
ui/shared/Token
'
;
import
Utilization
from
'
ui/shared/Utilization
'
;
import
Utilization
from
'
ui/shared/Utilization
'
;
...
@@ -79,24 +78,20 @@ const TxDetails = () => {
...
@@ -79,24 +78,20 @@ const TxDetails = () => {
hint=
"Address (external or contract) sending the transaction."
hint=
"Address (external or contract) sending the transaction."
mt=
{
8
}
mt=
{
8
}
>
>
<
Address
hash=
{
tx
.
address_from
}
>
<
Address
>
<
AddressIcon
/>
<
AddressIcon
hash=
{
tx
.
address_from
}
/>
<
AddressLink
ml=
{
2
}
>
<
AddressLink
ml=
{
2
}
hash=
{
tx
.
address_from
}
/>
<
HashStringShortenDynamic
/>
<
CopyToClipboard
text=
{
tx
.
address_from
}
/>
</
AddressLink
>
<
CopyToClipboard
/>
</
Address
>
</
Address
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Interacted with contract"
title=
"Interacted with contract"
hint=
"Address (external or contract) receiving the transaction."
hint=
"Address (external or contract) receiving the transaction."
>
>
<
Address
hash=
{
tx
.
address_to
}
>
<
Address
>
<
AddressIcon
/>
<
AddressIcon
hash=
{
tx
.
address_to
}
/>
<
AddressLink
ml=
{
2
}
>
<
AddressLink
ml=
{
2
}
hash=
{
tx
.
address_to
}
/>
<
HashStringShortenDynamic
/>
<
CopyToClipboard
text=
{
tx
.
address_to
}
/>
</
AddressLink
>
<
CopyToClipboard
/>
</
Address
>
</
Address
>
<
Tag
colorScheme=
"orange"
variant=
"solid"
ml=
{
3
}
>
SANA
</
Tag
>
<
Tag
colorScheme=
"orange"
variant=
"solid"
ml=
{
3
}
>
SANA
</
Tag
>
<
Icon
as=
{
successIcon
}
boxSize=
{
4
}
ml=
{
2
}
color=
"green.500"
/>
<
Icon
as=
{
successIcon
}
boxSize=
{
4
}
ml=
{
2
}
color=
"green.500"
/>
...
...
ui/tx/internals/TxInternalsTableItem.tsx
View file @
7cebfd81
import
{
Tr
,
Td
,
Tag
,
Flex
,
Icon
}
from
'
@chakra-ui/react
'
;
import
{
Tr
,
Td
,
Tag
,
Icon
}
from
'
@chakra-ui/react
'
;
import
capitalize
from
'
lodash/capitalize
'
;
import
capitalize
from
'
lodash/capitalize
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -6,7 +6,6 @@ import rightArrowIcon from 'icons/arrows/right.svg';
...
@@ -6,7 +6,6 @@ import rightArrowIcon from 'icons/arrows/right.svg';
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
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
TxStatus
from
'
ui/tx/TxStatus
'
;
import
TxStatus
from
'
ui/tx/TxStatus
'
;
interface
Props
{
interface
Props
{
...
@@ -26,25 +25,17 @@ const TxInternalTableItem = ({ type, status, from, to, value, gasLimit }: Props)
...
@@ -26,25 +25,17 @@ const TxInternalTableItem = ({ type, status, from, to, value, gasLimit }: Props)
<
TxStatus
status=
{
status
}
/>
<
TxStatus
status=
{
status
}
/>
</
Td
>
</
Td
>
<
Td
pr=
"0"
>
<
Td
pr=
"0"
>
<
Flex
alignItems=
"center"
>
<
Address
>
<
Address
hash=
{
from
}
>
<
AddressIcon
hash=
{
from
}
/>
<
AddressIcon
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
from
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
>
<
Icon
as=
{
rightArrowIcon
}
boxSize=
{
6
}
mx=
{
2
}
flexShrink=
{
0
}
color=
"gray.500"
/>
<
HashStringShortenDynamic
/>
</
Address
>
</
AddressLink
>
</
Address
>
<
Icon
as=
{
rightArrowIcon
}
boxSize=
{
6
}
mx=
{
2
}
color=
"gray.500"
/>
</
Flex
>
</
Td
>
</
Td
>
<
Td
pl=
"0"
>
<
Td
pl=
"0"
>
<
Flex
alignItems=
"center"
>
<
Address
>
<
Address
hash=
{
to
}
>
<
AddressIcon
hash=
{
to
}
/>
<
AddressIcon
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
hash=
{
to
}
/>
<
AddressLink
ml=
{
2
}
fontWeight=
"500"
>
</
Address
>
<
HashStringShortenDynamic
/>
</
AddressLink
>
</
Address
>
</
Flex
>
</
Td
>
</
Td
>
<
Td
isNumeric
>
<
Td
isNumeric
>
{
value
}
{
value
}
...
...
ui/tx/logs/TxLogItem.tsx
View file @
7cebfd81
...
@@ -5,7 +5,6 @@ import React from 'react';
...
@@ -5,7 +5,6 @@ import React from 'react';
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
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
TxLogTopic
from
'
ui/tx/logs/TxLogTopic
'
;
import
TxLogTopic
from
'
ui/tx/logs/TxLogTopic
'
;
import
DecodedInputData
from
'
ui/tx/TxDecodedInputData
'
;
import
DecodedInputData
from
'
ui/tx/TxDecodedInputData
'
;
...
@@ -26,11 +25,9 @@ const TxLogItem = ({ address, index, topics, data }: Props) => {
...
@@ -26,11 +25,9 @@ const TxLogItem = ({ address, index, topics, data }: Props) => {
<
Grid
gridTemplateColumns=
"200px 1fr"
gap=
{
8
}
py=
{
8
}
_notFirst=
{
{
borderTopWidth
:
'
1px
'
,
borderTopColor
:
borderColor
}
}
>
<
Grid
gridTemplateColumns=
"200px 1fr"
gap=
{
8
}
py=
{
8
}
_notFirst=
{
{
borderTopWidth
:
'
1px
'
,
borderTopColor
:
borderColor
}
}
>
<
RowHeader
>
Address
</
RowHeader
>
<
RowHeader
>
Address
</
RowHeader
>
<
GridItem
display=
"flex"
alignItems=
"center"
>
<
GridItem
display=
"flex"
alignItems=
"center"
>
<
Address
hash=
{
address
}
>
<
Address
>
<
AddressIcon
/>
<
AddressIcon
hash=
{
address
}
/>
<
AddressLink
ml=
{
2
}
>
<
AddressLink
hash=
{
address
}
ml=
{
2
}
/>
<
HashStringShortenDynamic
/>
</
AddressLink
>
</
Address
>
</
Address
>
<
Tooltip
label=
"Find matches topic"
>
<
Tooltip
label=
"Find matches topic"
>
<
Link
ml=
{
2
}
>
<
Link
ml=
{
2
}
>
...
...
ui/tx/state/TxStateTableItem.tsx
View file @
7cebfd81
...
@@ -7,7 +7,6 @@ import {
...
@@ -7,7 +7,6 @@ import {
Box
,
Box
,
Tr
,
Tr
,
Td
,
Td
,
Flex
,
Stat
,
Stat
,
StatArrow
,
StatArrow
,
Portal
,
Portal
,
...
@@ -18,8 +17,9 @@ import React, { useRef } from 'react';
...
@@ -18,8 +17,9 @@ 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
AddressIcon
from
'
ui/shared/AddressIcon
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressLinkWithTooltip
from
'
ui/shared/AddressLinkWithTooltip
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
TxStateStorageItem
from
'
./TxStateStorageItem
'
;
import
TxStateStorageItem
from
'
./TxStateStorageItem
'
;
...
@@ -57,10 +57,10 @@ const TxStateTableItem = ({ txStateItem }: { txStateItem: TTxStateItem }) => {
...
@@ -57,10 +57,10 @@ const TxStateTableItem = ({ txStateItem }: { txStateItem: TTxStateItem }) => {
</
AccordionButton
>
</
AccordionButton
>
</
Td
>
</
Td
>
<
Td
border=
{
0
}
>
<
Td
border=
{
0
}
>
<
Flex
height=
"30px"
alignItems=
"center
"
>
<
Address
height=
"30px
"
>
<
AddressIcon
address
=
{
txStateItem
.
address
}
/>
<
AddressIcon
hash
=
{
txStateItem
.
address
}
/>
<
AddressLink
WithTooltip
address=
{
txStateItem
.
address
}
fontWeight=
"500"
truncated
withCopy=
{
false
}
ml=
{
2
}
/>
<
AddressLink
hash=
{
txStateItem
.
address
}
fontWeight=
"500"
truncation=
"constant"
ml=
{
2
}
/>
</
Flex
>
</
Address
>
</
Td
>
</
Td
>
<
Td
border=
{
0
}
lineHeight=
"30px"
><
Link
>
{
txStateItem
.
miner
}
</
Link
></
Td
>
<
Td
border=
{
0
}
lineHeight=
"30px"
><
Link
>
{
txStateItem
.
miner
}
</
Link
></
Td
>
<
Td
border=
{
0
}
isNumeric
lineHeight=
"30px"
>
<
Td
border=
{
0
}
isNumeric
lineHeight=
"30px"
>
...
...
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