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
caea207d
Commit
caea207d
authored
Dec 05, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address api fixes
parent
2d1d77e9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
address.ts
types/api/address.ts
+3
-3
AddressDetails.tsx
ui/address/AddressDetails.tsx
+5
-4
No files found.
types/api/address.ts
View file @
caea207d
...
...
@@ -20,10 +20,10 @@ export interface Address {
}
export
interface
AddressCounters
{
transaction_count
:
string
;
token_transfer_count
:
string
;
transaction
s
_count
:
string
;
token_transfer
s
_count
:
string
;
gas_usage_count
:
string
;
validation_count
:
string
|
null
;
validation
s
_count
:
string
|
null
;
}
export
interface
AddressTokenBalance
{
...
...
ui/address/AddressDetails.tsx
View file @
caea207d
...
...
@@ -55,6 +55,7 @@ const AddressDetails = ({ addressQuery }: Props) => {
}
const
explorers
=
appConfig
.
network
.
explorers
.
filter
(({
paths
})
=>
paths
.
address
);
const
validationsCount
=
Number
(
countersQuery
.
data
.
validations_count
);
return
(
<
Box
>
...
...
@@ -117,13 +118,13 @@ const AddressDetails = ({ addressQuery }: Props) => {
title=
"Transactions"
hint=
"Number of transactions related to this address."
>
{
Number
(
countersQuery
.
data
.
transaction_count
).
toLocaleString
()
}
{
Number
(
countersQuery
.
data
.
transaction
s
_count
).
toLocaleString
()
}
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
"Transfers"
hint=
"Number of transfers to/from this address."
>
{
Number
(
countersQuery
.
data
.
token_transfer_count
).
toLocaleString
()
}
{
Number
(
countersQuery
.
data
.
token_transfer
s
_count
).
toLocaleString
()
}
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
"Gas used"
...
...
@@ -131,12 +132,12 @@ const AddressDetails = ({ addressQuery }: Props) => {
>
{
BigNumber
(
countersQuery
.
data
.
gas_usage_count
).
toFormat
()
}
</
DetailsInfoItem
>
{
countersQuery
.
data
.
validation_count
&&
(
{
!
Object
.
is
(
validationsCount
,
NaN
)
&&
validationsCount
>
0
&&
(
<
DetailsInfoItem
title=
"Blocks validated"
hint=
"Number of blocks validated by this validator."
>
{
Number
(
countersQuery
.
data
.
validation_count
)
.
toLocaleString
()
}
{
validationsCount
.
toLocaleString
()
}
</
DetailsInfoItem
>
)
}
</
Grid
>
...
...
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