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
0ef2a6ba
Commit
0ef2a6ba
authored
Dec 18, 2024
by
tom
Committed by
tom goriunov
Dec 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sorting by block number on transactions page
parent
517308b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
sortTxs.ts
ui/txs/sortTxs.ts
+6
-0
useTxsSort.tsx
ui/txs/useTxsSort.tsx
+1
-0
No files found.
ui/txs/sortTxs.ts
View file @
0ef2a6ba
...
@@ -13,6 +13,12 @@ export default function sortTxs(sorting: TransactionsSortingValue | undefined) {
...
@@ -13,6 +13,12 @@ export default function sortTxs(sorting: TransactionsSortingValue | undefined) {
return
compareBns
(
tx2
.
fee
.
value
||
0
,
tx1
.
fee
.
value
||
0
);
return
compareBns
(
tx2
.
fee
.
value
||
0
,
tx1
.
fee
.
value
||
0
);
case
'
fee-asc
'
:
case
'
fee-asc
'
:
return
compareBns
(
tx1
.
fee
.
value
||
0
,
tx2
.
fee
.
value
||
0
);
return
compareBns
(
tx1
.
fee
.
value
||
0
,
tx2
.
fee
.
value
||
0
);
case
'
block_number-asc
'
:
{
if
(
tx1
.
block_number
&&
tx2
.
block_number
)
{
return
tx1
.
block_number
-
tx2
.
block_number
;
}
return
0
;
}
default
:
default
:
return
0
;
return
0
;
}
}
...
...
ui/txs/useTxsSort.tsx
View file @
0ef2a6ba
...
@@ -15,6 +15,7 @@ export const SORT_OPTIONS: Array<SelectOption<TransactionsSortingValue>> = [
...
@@ -15,6 +15,7 @@ export const SORT_OPTIONS: Array<SelectOption<TransactionsSortingValue>> = [
{
label
:
'
Value descending
'
,
value
:
'
value-desc
'
},
{
label
:
'
Value descending
'
,
value
:
'
value-desc
'
},
{
label
:
'
Fee ascending
'
,
value
:
'
fee-asc
'
},
{
label
:
'
Fee ascending
'
,
value
:
'
fee-asc
'
},
{
label
:
'
Fee descending
'
,
value
:
'
fee-desc
'
},
{
label
:
'
Fee descending
'
,
value
:
'
fee-desc
'
},
{
label
:
'
Block number ascending
'
,
value
:
'
block_number-asc
'
},
];
];
type
SortingValue
=
TransactionsSortingValue
|
undefined
;
type
SortingValue
=
TransactionsSortingValue
|
undefined
;
...
...
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