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
729dacb3
Commit
729dacb3
authored
Dec 21, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tx fixes
parent
3a73c009
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
25 deletions
+34
-25
TxDetails.tsx
ui/tx/TxDetails.tsx
+22
-17
TxRawTrace.tsx
ui/tx/TxRawTrace.tsx
+4
-0
TxsSkeletonDesktop.tsx
ui/txs/TxsSkeletonDesktop.tsx
+2
-2
TxsTable.tsx
ui/txs/TxsTable.tsx
+6
-6
No files found.
ui/tx/TxDetails.tsx
View file @
729dacb3
...
@@ -65,6 +65,21 @@ const TxDetails = () => {
...
@@ -65,6 +65,21 @@ const TxDetails = () => {
...
toAddress
.
watchlist_names
||
[],
...
toAddress
.
watchlist_names
||
[],
].
map
((
tag
)
=>
<
Tag
key=
{
tag
.
label
}
>
{
tag
.
display_name
}
</
Tag
>);
].
map
((
tag
)
=>
<
Tag
key=
{
tag
.
label
}
>
{
tag
.
display_name
}
</
Tag
>);
const
executionSuccessBadge
=
toAddress
.
is_contract
&&
data
.
result
===
'
success
'
?
(
<
Tooltip
label=
"Contract execution completed"
>
<
chakra
.
span
display=
"inline-flex"
ml=
{
2
}
mr=
{
1
}
>
<
Icon
as=
{
successIcon
}
boxSize=
{
4
}
color=
"green.500"
cursor=
"pointer"
/>
</
chakra
.
span
>
</
Tooltip
>
)
:
null
;
const
executionFailedBadge
=
toAddress
.
is_contract
&&
Boolean
(
data
.
status
)
&&
data
.
result
!==
'
success
'
?
(
<
Tooltip
label=
"Error occurred during contract execution"
>
<
chakra
.
span
display=
"inline-flex"
ml=
{
2
}
mr=
{
1
}
>
<
Icon
as=
{
errorIcon
}
boxSize=
{
4
}
color=
"red.500"
cursor=
"pointer"
/>
</
chakra
.
span
>
</
Tooltip
>
)
:
null
;
return
(
return
(
<
Grid
columnGap=
{
8
}
rowGap=
{
{
base
:
3
,
lg
:
3
}
}
templateColumns=
{
{
base
:
'
minmax(0, 1fr)
'
,
lg
:
'
auto minmax(0, 1fr)
'
}
}
>
<
Grid
columnGap=
{
8
}
rowGap=
{
{
base
:
3
,
lg
:
3
}
}
templateColumns=
{
{
base
:
'
minmax(0, 1fr)
'
,
lg
:
'
auto minmax(0, 1fr)
'
}
}
>
{
socketStatus
&&
(
{
socketStatus
&&
(
...
@@ -144,40 +159,30 @@ const TxDetails = () => {
...
@@ -144,40 +159,30 @@ const TxDetails = () => {
)
}
)
}
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
DetailsInfoItem
<
DetailsInfoItem
title=
{
toAddress
.
is_contract
?
'
Interacted with contract
'
:
'
To
'
}
title=
{
data
.
to
?
.
is_contract
?
'
Interacted with contract
'
:
'
To
'
}
hint=
"Address (external or contract) receiving the transaction."
hint=
"Address (external or contract) receiving the transaction."
flexWrap=
{
{
base
:
'
wrap
'
,
lg
:
'
nowrap
'
}
}
flexWrap=
{
{
base
:
'
wrap
'
,
lg
:
'
nowrap
'
}
}
columnGap=
{
3
}
columnGap=
{
3
}
>
>
{
data
.
to
&&
data
.
to
.
hash
?
(
{
data
.
to
&&
data
.
to
.
hash
?
(
<
Address
>
<
Address
alignItems=
"center"
>
<
AddressIcon
hash=
{
toAddress
.
hash
}
/>
<
AddressIcon
hash=
{
toAddress
.
hash
}
/>
<
AddressLink
ml=
{
2
}
hash=
{
toAddress
.
hash
}
/>
<
AddressLink
ml=
{
2
}
hash=
{
toAddress
.
hash
}
/>
{
executionSuccessBadge
}
{
executionFailedBadge
}
<
CopyToClipboard
text=
{
toAddress
.
hash
}
/>
<
CopyToClipboard
text=
{
toAddress
.
hash
}
/>
</
Address
>
</
Address
>
)
:
(
)
:
(
<
Flex
width=
{
{
base
:
'
100%
'
,
lg
:
'
auto
'
}
}
whiteSpace=
"pre"
>
<
Flex
width=
{
{
base
:
'
100%
'
,
lg
:
'
auto
'
}
}
whiteSpace=
"pre"
alignItems=
"center"
>
<
span
>
[Contract
</
span
>
<
span
>
[Contract
</
span
>
<
AddressLink
hash=
{
toAddress
.
hash
}
/>
<
AddressLink
hash=
{
toAddress
.
hash
}
/>
<
span
>
created]
</
span
>
<
span
>
created]
</
span
>
{
executionSuccessBadge
}
{
executionFailedBadge
}
<
CopyToClipboard
text=
{
toAddress
.
hash
}
/>
<
CopyToClipboard
text=
{
toAddress
.
hash
}
/>
</
Flex
>
</
Flex
>
)
}
)
}
{
toAddress
.
name
&&
<
Text
>
{
toAddress
.
name
}
</
Text
>
}
{
toAddress
.
name
&&
<
Text
>
{
toAddress
.
name
}
</
Text
>
}
{
toAddress
.
is_contract
&&
data
.
result
===
'
success
'
&&
(
<
Tooltip
label=
"Contract execution completed"
>
<
chakra
.
span
display=
"inline-flex"
>
<
Icon
as=
{
successIcon
}
boxSize=
{
4
}
color=
"green.500"
cursor=
"pointer"
/>
</
chakra
.
span
>
</
Tooltip
>
)
}
{
toAddress
.
is_contract
&&
Boolean
(
data
.
status
)
&&
data
.
result
!==
'
success
'
&&
(
<
Tooltip
label=
"Error occured during contract execution"
>
<
chakra
.
span
display=
"inline-flex"
>
<
Icon
as=
{
errorIcon
}
boxSize=
{
4
}
color=
"red.500"
cursor=
"pointer"
/>
</
chakra
.
span
>
</
Tooltip
>
)
}
{
addressToTags
.
length
>
0
&&
(
{
addressToTags
.
length
>
0
&&
(
<
Flex
columnGap=
{
3
}
>
<
Flex
columnGap=
{
3
}
>
{
addressToTags
}
{
addressToTags
}
...
...
ui/tx/TxRawTrace.tsx
View file @
729dacb3
...
@@ -46,6 +46,10 @@ const TxRawTrace = () => {
...
@@ -46,6 +46,10 @@ const TxRawTrace = () => {
);
);
}
}
if
(
data
.
length
===
0
)
{
return
<
span
>
There is no raw trace for this transaction.
</
span
>;
}
const
text
=
JSON
.
stringify
(
data
,
undefined
,
4
);
const
text
=
JSON
.
stringify
(
data
,
undefined
,
4
);
return
(
return
(
...
...
ui/txs/TxsSkeletonDesktop.tsx
View file @
729dacb3
...
@@ -11,8 +11,8 @@ const TxsInternalsSkeletonDesktop = ({ showBlockInfo }: Props) => {
...
@@ -11,8 +11,8 @@ const TxsInternalsSkeletonDesktop = ({ showBlockInfo }: Props) => {
return
(
return
(
<
Box
mb=
{
8
}
>
<
Box
mb=
{
8
}
>
<
SkeletonTable
columns=
{
showBlockInfo
?
<
SkeletonTable
columns=
{
showBlockInfo
?
[
'
32px
'
,
'
2
0%
'
,
'
18%
'
,
'
15%
'
,
'
11%
'
,
'
292px
'
,
'
18%
'
,
'
18
%
'
]
:
[
'
32px
'
,
'
2
2%
'
,
'
160px
'
,
'
20%
'
,
'
18%
'
,
'
292px
'
,
'
20%
'
,
'
20
%
'
]
:
[
'
32px
'
,
'
2
0%
'
,
'
18%
'
,
'
15%
'
,
'
292px
'
,
'
18%
'
,
'
18
%
'
]
[
'
32px
'
,
'
2
2%
'
,
'
160px
'
,
'
20%
'
,
'
292px
'
,
'
20%
'
,
'
20
%
'
]
}
/>
}
/>
</
Box
>
</
Box
>
);
);
...
...
ui/txs/TxsTable.tsx
View file @
729dacb3
...
@@ -27,21 +27,21 @@ const TxsTable = ({ txs, sort, sorting, top, showBlockInfo, showSocketInfo, curr
...
@@ -27,21 +27,21 @@ const TxsTable = ({ txs, sort, sorting, top, showBlockInfo, showSocketInfo, curr
<
TheadSticky
top=
{
top
}
>
<
TheadSticky
top=
{
top
}
>
<
Tr
>
<
Tr
>
<
Th
width=
"54px"
></
Th
>
<
Th
width=
"54px"
></
Th
>
<
Th
width=
"
18
%"
>
Txn hash
</
Th
>
<
Th
width=
"
22
%"
>
Txn hash
</
Th
>
<
Th
width=
"
20%
"
>
Type
</
Th
>
<
Th
width=
"
160px
"
>
Type
</
Th
>
<
Th
width=
"
15
%"
>
Method
</
Th
>
<
Th
width=
"
20
%"
>
Method
</
Th
>
{
showBlockInfo
&&
<
Th
width=
"1
1
%"
>
Block
</
Th
>
}
{
showBlockInfo
&&
<
Th
width=
"1
8
%"
>
Block
</
Th
>
}
<
Th
width=
{
{
xl
:
'
128px
'
,
base
:
'
66px
'
}
}
>
From
</
Th
>
<
Th
width=
{
{
xl
:
'
128px
'
,
base
:
'
66px
'
}
}
>
From
</
Th
>
<
Th
width=
{
{
xl
:
currentAddress
?
'
48px
'
:
'
36px
'
,
base
:
'
0
'
}
}
></
Th
>
<
Th
width=
{
{
xl
:
currentAddress
?
'
48px
'
:
'
36px
'
,
base
:
'
0
'
}
}
></
Th
>
<
Th
width=
{
{
xl
:
'
128px
'
,
base
:
'
66px
'
}
}
>
To
</
Th
>
<
Th
width=
{
{
xl
:
'
128px
'
,
base
:
'
66px
'
}
}
>
To
</
Th
>
<
Th
width=
"
18
%"
isNumeric
>
<
Th
width=
"
20
%"
isNumeric
>
<
Link
onClick=
{
sort
(
'
val
'
)
}
display=
"flex"
justifyContent=
"end"
>
<
Link
onClick=
{
sort
(
'
val
'
)
}
display=
"flex"
justifyContent=
"end"
>
{
sorting
===
'
val-asc
'
&&
<
Icon
boxSize=
{
5
}
as=
{
rightArrowIcon
}
transform=
"rotate(-90deg)"
/>
}
{
sorting
===
'
val-asc
'
&&
<
Icon
boxSize=
{
5
}
as=
{
rightArrowIcon
}
transform=
"rotate(-90deg)"
/>
}
{
sorting
===
'
val-desc
'
&&
<
Icon
boxSize=
{
5
}
as=
{
rightArrowIcon
}
transform=
"rotate(90deg)"
/>
}
{
sorting
===
'
val-desc
'
&&
<
Icon
boxSize=
{
5
}
as=
{
rightArrowIcon
}
transform=
"rotate(90deg)"
/>
}
{
`Value ${ appConfig.network.currency.symbol }`
}
{
`Value ${ appConfig.network.currency.symbol }`
}
</
Link
>
</
Link
>
</
Th
>
</
Th
>
<
Th
width=
"
18
%"
isNumeric
pr=
{
5
}
>
<
Th
width=
"
20
%"
isNumeric
pr=
{
5
}
>
<
Link
onClick=
{
sort
(
'
fee
'
)
}
display=
"flex"
justifyContent=
"end"
>
<
Link
onClick=
{
sort
(
'
fee
'
)
}
display=
"flex"
justifyContent=
"end"
>
{
sorting
===
'
fee-asc
'
&&
<
Icon
boxSize=
{
5
}
as=
{
rightArrowIcon
}
transform=
"rotate(-90deg)"
/>
}
{
sorting
===
'
fee-asc
'
&&
<
Icon
boxSize=
{
5
}
as=
{
rightArrowIcon
}
transform=
"rotate(-90deg)"
/>
}
{
sorting
===
'
fee-desc
'
&&
<
Icon
boxSize=
{
5
}
as=
{
rightArrowIcon
}
transform=
"rotate(90deg)"
/>
}
{
sorting
===
'
fee-desc
'
&&
<
Icon
boxSize=
{
5
}
as=
{
rightArrowIcon
}
transform=
"rotate(90deg)"
/>
}
...
...
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