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
1c81dbae
Commit
1c81dbae
authored
Aug 18, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add n/a
parent
d3b8e061
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
WatchListAddressItem.tsx
ui/watchlist/WatchlistTable/WatchListAddressItem.tsx
+10
-10
No files found.
ui/watchlist/WatchlistTable/WatchListAddressItem.tsx
View file @
1c81dbae
...
@@ -16,26 +16,26 @@ const DECIMALS = 18;
...
@@ -16,26 +16,26 @@ const DECIMALS = 18;
const
WatchListAddressItem
=
({
item
}:
{
item
:
TWatchlistItem
})
=>
{
const
WatchListAddressItem
=
({
item
}:
{
item
:
TWatchlistItem
})
=>
{
const
mainTextColor
=
useColorModeValue
(
'
gray.700
'
,
'
gray.50
'
);
const
mainTextColor
=
useColorModeValue
(
'
gray.700
'
,
'
gray.50
'
);
const
xdaiBalance
=
((
item
.
address_balance
||
0
)
/
10
**
DECIMALS
).
toFixed
(
1
);
const
nativeBalance
=
((
item
.
address_balance
||
0
)
/
10
**
DECIMALS
).
toFixed
(
1
);
const
nativeBalanceUSD
=
item
.
exchange_rate
?
`$
${
Number
(
nativeBalance
)
*
item
.
exchange_rate
}
USD`
:
'
N/A
'
;
return
(
return
(
<
HStack
spacing=
{
3
}
align=
"top"
>
<
HStack
spacing=
{
3
}
align=
"top"
>
<
AddressIcon
address=
{
item
.
address_hash
}
/>
<
AddressIcon
address=
{
item
.
address_hash
}
/>
<
VStack
spacing=
{
2
}
align=
"stretch"
overflow=
"hidden"
fontWeight=
{
500
}
color=
"gray.700"
>
<
VStack
spacing=
{
2
}
align=
"stretch"
overflow=
"hidden"
fontWeight=
{
500
}
color=
"gray.700"
>
<
AddressLinkWithTooltip
address=
{
item
.
address
}
/>
<
AddressLinkWithTooltip
address=
{
item
.
address_hash
}
/>
{
item
.
tokenBalance
&&
(
<
HStack
spacing=
{
0
}
fontSize=
"sm"
h=
{
6
}
>
<
HStack
spacing=
{
0
}
fontSize=
"sm"
h=
{
6
}
>
<
Image
src=
"./xdai.png"
alt=
"chain-logo"
marginRight=
"10px"
w=
"16px"
h=
"16px"
/>
<
Image
src=
"./xdai.png"
alt=
"chain-logo"
marginRight=
"10px"
w=
"16px"
h=
"16px"
/>
<
Text
color=
{
mainTextColor
}
>
{
`xDAI balance:${ nbsp }`
+
nativeBalance
}
</
Text
>
<
Text
color=
{
mainTextColor
}
>
{
`xDAI balance:${ nbsp }`
+
item
.
tokenBalance
}
</
Text
>
<
Text
variant=
"secondary"
>
{
`${ nbsp }(${ nativeBalanceUSD })`
}
</
Text
>
<
Text
variant=
"secondary"
>
{
`${ nbsp }($${ item.tokenBalanceUSD } USD)`
}
</
Text
>
</
HStack
>
</
HStack
>
{
item
.
tokens_count
&&
(
)
}
{
item
.
tokensAmount
&&
(
<
HStack
spacing=
{
0
}
fontSize=
"sm"
h=
{
6
}
>
<
HStack
spacing=
{
0
}
fontSize=
"sm"
h=
{
6
}
>
<
Icon
as=
{
TokensIcon
}
marginRight=
"10px"
w=
"17px"
h=
"16px"
/>
<
Icon
as=
{
TokensIcon
}
marginRight=
"10px"
w=
"17px"
h=
"16px"
/>
<
Text
color=
{
mainTextColor
}
>
{
`Tokens:${ nbsp }`
+
item
.
tokens_count
}
</
Text
>
<
Text
color=
{
mainTextColor
}
>
{
`Tokens:${ nbsp }`
+
item
.
tokens_count
}
</
Text
>
{
/* api does not provide token prices */
}
{
/* api does not provide token prices */
}
{
/* <Text variant="secondary">{ `${ nbsp }($${ item.tokensUSD } USD)` }</Text> */
}
{
/* <Text variant="secondary">{ `${ nbsp }($${ item.tokensUSD } USD)` }</Text> */
}
<
Text
variant=
"secondary"
>
{
`${ nbsp }(N/A)`
}
</
Text
>
</
HStack
>
</
HStack
>
)
}
)
}
{
/* api does not provide token prices */
}
{
/* api does not provide token prices */
}
...
...
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