Page MenuHomePhabricator

[Cashtab] fix stale cached data
ClosedPublic

Authored by hungsam on Feb 3 2022, 01:32.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABCacc98ce62717: [Cashtab] fix stale cached data
Summary
  1. Uncofirmed Transaction
  2. Unconfirmed tx has blocktime set to "undefined"
  3. Cashtab shows unconfirmed tx as being created "Today"
  4. Caching unconfirmed tx with CacheFirst strategy will cause the tx to always shown as "Today"
  5. This fix make sure that only confirmed txs are cached.
  1. SLP Token Stats
  2. SLP Token Stats (totalMinted, totalBurned) is specific to a particular moment in time. It does not make sense to cache them
  3. This fix remove the caching of SLP Token Stats
  1. Removing old caches
  2. simply changing the suffix to 'v1.0.1' will discard the old caches
Test Plan
  • cd web/cashtab
  • npm start
  • navigate to localhost:3000
  • check that the following caches are created:

+ cashtab-static-assets-v1.0.1
+ cashtab-tx-data-v1.0.1
+ cashtab-slp-tx-data-v1.0.1 (if you have token tx)

  • send some XECs and Tokens
  • inspect the caches to verify that unconfirmed txs are not cached
  • wait for the txs become confirmed
  • inspect the caches again to verify that the newly confirmed txs are cached

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

hungsam requested review of this revision.Feb 3 2022, 01:32
This revision is now accepted and ready to land.Feb 3 2022, 23:45
This revision was automatically updated to reflect the committed changes.