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
fcfc5256
Commit
fcfc5256
authored
Sep 29, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix after merge
parent
75193642
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
BlockDetails.tsx
ui/block/BlockDetails.tsx
+9
-4
Block.tsx
ui/pages/Block.tsx
+3
-3
No files found.
ui/block/BlockDetails.tsx
View file @
fcfc5256
...
...
@@ -7,6 +7,7 @@ import { block } from 'data/block';
import
clockIcon
from
'
icons/clock.svg
'
;
import
flameIcon
from
'
icons/flame.svg
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
useNetwork
from
'
lib/hooks/useNetwork
'
;
import
{
space
}
from
'
lib/html-entities
'
;
import
useLink
from
'
lib/link/useLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
...
...
@@ -21,6 +22,7 @@ const BlockDetails = () => {
const
[
isExpanded
,
setIsExpanded
]
=
React
.
useState
(
false
);
const
link
=
useLink
();
const
router
=
useRouter
();
const
network
=
useNetwork
();
const
handleCutClick
=
React
.
useCallback
(()
=>
{
setIsExpanded
((
flag
)
=>
!
flag
);
...
...
@@ -77,7 +79,10 @@ const BlockDetails = () => {
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
"Block reward"
hint=
"For each block, the miner is rewarded with a finite amount of Ether on top of the fees paid for all transactions in the block."
hint=
{
`For each block, the miner is rewarded with a finite amount of ${ network?.currency || 'native token' }
on top of the fees paid for all transactions in the block.`
}
columnGap=
{
1
}
>
<
Text
>
{
block
.
reward
.
static
+
block
.
reward
.
tx_fee
-
block
.
burnt_fees
}
</
Text
>
...
...
@@ -119,15 +124,15 @@ const BlockDetails = () => {
title=
"Base fee per gas"
hint=
"Minimum fee required per unit of gas. Fee adjusts based on network congestion."
>
<
Text
>
{
(
block
.
base_fee_per_gas
/
10
**
9
).
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
18
})
}
Ether
</
Text
>
<
Text
>
{
(
block
.
base_fee_per_gas
/
10
**
9
).
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
18
})
}
{
network
?.
currency
}
</
Text
>
<
Text
variant=
"secondary"
whiteSpace=
"pre"
>
{
space
}
(
{
block
.
base_fee_per_gas
.
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
9
})
}
Gwei)
</
Text
>
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
"Burnt fees"
hint=
"Amount of ETH burned from transactions included in the block. Equals Block Base Fee per Gas * Gas Used."
hint=
{
`Amount of ${ network?.currency || 'native token' } burned from transactions included in the block. Equals Block Base Fee per Gas * Gas Used.`
}
>
<
Icon
as=
{
flameIcon
}
boxSize=
{
5
}
color=
"gray.500"
/>
<
Text
ml=
{
1
}
>
{
block
.
burnt_fees
.
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
18
})
}
Ether
</
Text
>
<
Text
ml=
{
1
}
>
{
block
.
burnt_fees
.
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
18
})
}
{
network
?.
currency
}
</
Text
>
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
"Extra data"
...
...
ui/pages/Block.tsx
View file @
fcfc5256
...
...
@@ -5,8 +5,8 @@ import type { RoutedTab } from 'ui/shared/RoutedTabs/types';
import
BlockDetails
from
'
ui/block/BlockDetails
'
;
import
BlockTxs
from
'
ui/block/BlockTxs
'
;
import
Page
from
'
ui/shared/Page
'
;
import
Page
Header
from
'
ui/shared/PageHeader
'
;
import
Page
from
'
ui/shared/Page
/Page
'
;
import
Page
Title
from
'
ui/shared/Page/PageTitle
'
;
import
RoutedTabs
from
'
ui/shared/RoutedTabs/RoutedTabs
'
;
const
TABS
:
Array
<
RoutedTab
>
=
[
...
...
@@ -23,7 +23,7 @@ const BlockPageContent = ({ tab }: Props) => {
return
(
<
Page
>
<
Page
Header
text=
{
`Block #${ router.query.id || '' }`
}
/>
<
Page
Title
text=
{
`Block #${ router.query.id || '' }`
}
/>
<
RoutedTabs
tabs=
{
TABS
}
defaultActiveTab=
{
tab
}
...
...
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