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
de1427ab
Commit
de1427ab
authored
May 08, 2024
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix internal txs sorting
parent
50a96d5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
TxInternals.tsx
ui/tx/TxInternals.tsx
+6
-8
No files found.
ui/tx/TxInternals.tsx
View file @
de1427ab
...
...
@@ -3,6 +3,7 @@ import React from 'react';
import
type
{
InternalTransaction
}
from
'
types/api/internalTransaction
'
;
import
compareBns
from
'
lib/bigint/compareBns
'
;
// import { apos } from 'lib/html-entities';
import
{
INTERNAL_TX
}
from
'
stubs/internalTx
'
;
import
{
generateListStub
}
from
'
stubs/utils
'
;
...
...
@@ -31,23 +32,20 @@ const getNextSortValue = (getNextSortValueShared<SortField, Sort>).bind(undefine
const
sortFn
=
(
sort
:
Sort
|
undefined
)
=>
(
a
:
InternalTransaction
,
b
:
InternalTransaction
)
=>
{
switch
(
sort
)
{
case
'
value-desc
'
:
{
const
result
=
a
.
value
>
b
.
value
?
-
1
:
1
;
return
a
.
value
===
b
.
value
?
0
:
result
;
return
compareBns
(
b
.
value
,
a
.
value
);
}
case
'
value-asc
'
:
{
const
result
=
a
.
value
>
b
.
value
?
1
:
-
1
;
return
a
.
value
===
b
.
value
?
0
:
result
;
return
compareBns
(
a
.
value
,
b
.
value
);
}
case
'
gas-limit-desc
'
:
{
const
result
=
a
.
gas_limit
>
b
.
gas_limit
?
-
1
:
1
;
return
a
.
gas_limit
===
b
.
gas_limit
?
0
:
result
;
return
compareBns
(
b
.
gas_limit
,
a
.
gas_limit
);
}
case
'
gas-limit-asc
'
:
{
const
result
=
a
.
gas_limit
>
b
.
gas_limit
?
1
:
-
1
;
return
a
.
gas_limit
===
b
.
gas_limit
?
0
:
result
;
return
compareBns
(
a
.
gas_limit
,
b
.
gas_limit
)
;
}
default
:
...
...
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