View Issue Details

IDProjectCategoryView StatusLast Update
0006559Talerwallet-corepublic2021-08-24 14:23
Reportergrote Assigned Togrote Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.8Fixed in Version0.8 
Summary0006559: Transactions not sorted as documented
DescriptionThe transactions currently returned by wallet core are not sorted as documented. The Android wallet currently needs to re-sort them.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Florian Dold

2020-09-04 06:24

manager   ~0016833

The wallet currently sorts transactions like this:

[ non-pending, ascending by time ]
[ pending, ascending by time ]

For the UI to show them in descending order, it just needs to reverse the list. No re-sorting required.

It's better to return the transactions in ascending order, since "ascending" is usually the default sorting order, and it is absolutely trivial for the UI to reverse the list before rendering.

Of course the wallet-core docs must be adjusted then.

grote

2020-09-04 12:02

reporter   ~0016844

> For the UI to show them in descending order, it just needs to reverse the list. No re-sorting required.

Last time I checked, I needed to do a complete re-sort, as otherwise pending ended up at the bottom.

> It's better to return the transactions in ascending order, since "ascending" is usually the default sorting order

When is it the default sorting order? AFAIK, the wallet API should sort transactions how wallets would show them.

Florian Dold

2020-09-04 12:19

manager   ~0016846

Can you point out an example where the sorting is wrong (not just reversed)? We should have an integration test for that! Though the current integration test already checks the order for transactions. Maybe the pending transactions are sometimes not ordered correctly?

(Regarding default sorting order: Pretty much everything that sorts numbers/dates sorts them ascending by default. SQL, Python, JavaScript, etc. TBH the main reason that I don't want to switch is that the integration tests assume this order for transactions in various places, which is harder to change *and* goes against the "natural order" ;-) )

Florian Dold

2020-09-09 07:40

manager   ~0016941

Actually, the order of pending and non-pending transactions was reversed. It was

  [p1 p2] [f1 f2]

instead of

  [f1 f2] [p1 p2]

Now by just calling .reverse, the transactions will be sorted in "UI view order".

Issue History

Date ModifiedUsernameFieldChange
2020-09-03 11:43groteNew Issue
2020-09-03 11:43groteStatusnew => assigned
2020-09-03 11:43groteAssigned To => Florian Dold
2020-09-04 06:24Florian DoldNote Added: 0016833
2020-09-04 06:25Florian DoldAssigned ToFlorian Dold => grote
2020-09-04 06:25Florian DoldStatusassigned => feedback
2020-09-04 12:02groteNote Added: 0016844
2020-09-04 12:19Florian DoldNote Added: 0016846
2020-09-09 07:40Florian DoldStatusfeedback => informing
2020-09-09 07:40Florian DoldResolutionopen => fixed
2020-09-09 07:40Florian DoldNote Added: 0016941
2020-10-03 12:08Christian GrothoffFixed in Version => 0.8
2020-10-03 12:10Christian GrothoffTarget Version => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2023-04-13 18:36Florian DoldCategorywallet (TS core) => wallet-core