Page MenuHomePhabricator

[Cashtab] Add tx history

Authored by josephroyking on Mar 18 2021, 00:32.


Group Reviewers
Restricted Project
rABC806cda77e068: [Cashtab] Add tx history

Add tx history to main wallet screen for the 10 most-recent confirmed transactions.

This ended up being a large diff. Data from available API had to be manipulated in specific ways to be suited for processing tx history. However, it's still only one feature, and a barebones version (does not process token txs, does not process unconfirmed txs, does not update as txs are sent or received -- features will be added in future diffs).

Unit tests and mocks are added for new functions. Although several files are changed, the only change from the user's perspective is seeing transaction history on the main screen.

Test Plan

npm test

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

Fabien requested changes to this revision.Mar 18 2021, 09:55
Fabien added a subscriber: Fabien.
Fabien added inline comments.
17 ↗(On Diff #27952)
25 ↗(On Diff #27952)

nit: layout

45 ↗(On Diff #27952)


131 ↗(On Diff #27952)


This revision now requires changes to proceed.Mar 18 2021, 09:56

Resolving comments. Keeping for now though because it parses token txs.

17 ↗(On Diff #27952) parses token transactions, so I think it's necessary to default there for now. This tx history feature currently only parses token transactions as "Sent or Received token transaction", so an explorer that says token quantity and ID is I think necessary.

Handle unconfirmed txs, remove redundant txHistory prop and instead only use parsedTxHistory to check if wallet is new

This revision is now accepted and ready to land.Mar 19 2021, 15:58