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
4aa73bbe
Commit
4aa73bbe
authored
Nov 04, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
markup fixes
parent
864a2aef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
TxDetailsTokenTransfer.tsx
ui/tx/details/TxDetailsTokenTransfer.tsx
+2
-3
TxDetailsTokenTransferList.tsx
ui/tx/details/TxDetailsTokenTransferList.tsx
+5
-5
TxDetailsTokenTransfers.tsx
ui/tx/details/TxDetailsTokenTransfers.tsx
+1
-1
No files found.
ui/tx/details/TxDetailsTokenTransfer.tsx
View file @
4aa73bbe
...
...
@@ -15,18 +15,17 @@ type Props = TTokenTransfer;
const
TxDetailsTokenTransfer
=
({
token
,
total
,
to
,
from
}:
Props
)
=>
{
const
isColumnLayout
=
token
.
type
===
'
ERC-1155
'
&&
Array
.
isArray
(
total
);
const
tokenSnippet
=
<
TokenSnippet
symbol=
{
token
.
symbol
}
hash=
{
token
.
address
}
name=
{
token
.
name
}
ml=
{
3
}
/>;
const
content
=
(()
=>
{
switch
(
token
.
type
)
{
case
'
ERC-20
'
:
{
const
payload
=
total
as
Erc20TotalPayload
;
return
(
<
Flex
>
<
Flex
flexWrap=
"wrap"
columnGap=
{
3
}
rowGap=
{
2
}
>
<
Text
fontWeight=
{
500
}
as=
"span"
>
For:
{
space
}
<
CurrencyValue
value=
{
payload
.
value
}
exchangeRate=
{
token
.
exchange_rate
}
fontWeight=
{
600
}
/>
</
Text
>
{
tokenSnippet
}
<
TokenSnippet
symbol=
{
token
.
symbol
}
hash=
{
token
.
address
}
name=
{
token
.
name
}
w=
"auto"
flexGrow=
"1"
/>
</
Flex
>
);
}
...
...
ui/tx/details/TxDetailsTokenTransferList.tsx
View file @
4aa73bbe
import
{
Flex
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
TokenTransfer
as
TTokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
TokenTransfer
from
'
./TxDetailsTokenTransfer
'
;
import
T
xDetailsT
okenTransfer
from
'
./TxDetailsTokenTransfer
'
;
interface
Props
{
items
:
Array
<
T
T
okenTransfer
>
;
items
:
Array
<
TokenTransfer
>
;
}
function
getItemsNum
(
items
:
Array
<
T
T
okenTransfer
>
)
{
function
getItemsNum
(
items
:
Array
<
TokenTransfer
>
)
{
const
nonErc1155items
=
items
.
filter
((
item
)
=>
item
.
token
.
type
!==
'
ERC-1155
'
).
length
;
const
erc1155items
=
items
.
filter
((
item
)
=>
item
.
token
.
type
===
'
ERC-1155
'
)
...
...
@@ -52,7 +52,7 @@ const TxDetailsTokenTransferList = ({ items }: Props) => {
pr=
{
hasScroll
?
5
:
0
}
pb=
{
hasScroll
?
10
:
0
}
>
{
items
.
map
((
item
,
index
)
=>
<
TokenTransfer
key=
{
index
}
{
...
item
}
/>)
}
{
items
.
map
((
item
,
index
)
=>
<
T
xDetailsT
okenTransfer
key=
{
index
}
{
...
item
}
/>)
}
</
Flex
>
);
};
...
...
ui/tx/details/TxDetailsTokenTransfers.tsx
View file @
4aa73bbe
...
...
@@ -38,7 +38,7 @@ const TxDetailsTokenTransfers = ({ data, txHash }: Props) => {
title=
{
(
<>
<
Text
as=
"span"
>
{
title
}
</
Text
>
{
items
.
length
>
1
&&
<
Text
as=
"span"
whiteSpace=
"pre"
variant=
"secondary"
>
(
{
items
.
length
}
)
</
Text
>
}
<
Text
as=
"span"
whiteSpace=
"pre"
variant=
"secondary"
>
(
{
items
.
length
}
)
</
Text
>
</>
)
}
hint=
{
hint
}
...
...
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