HomePhabricator

[Cashtab] [chronik tx history p3] Add a function to sort chronik tx history of…

Description

[Cashtab] [chronik tx history p3] Add a function to sort chronik tx history of all addresses by blockheight and timeFirstSeen

Summary:
T2447

Depends on D12051

Sort tx history by blockheightand timeFirstSeen. For unconfirmed txs, sort by timeFirstSeen. Most recent transactions appear earliest in the tx history array.

Test Plan:
Review unit tests and mocks to confirm desired tx order.
npm test

npm start
Send yourself some txs. In dev console, confirm that unconfirmed txs and confirmed txs are being properly sequestered. Confirm desired order in chronikTxHistory as flattened array, sorted by blockheight and time first seen.

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

Differential Revision: https://reviews.bitcoinabc.org/D12052