HomePhabricator

[Cashtab] [chronik utxo handling p5] Add support for caching token info to…

Description

[Cashtab] [chronik utxo handling p5] Add support for caching token info to limit chronik API calls to unseen tokens

Summary:
T2447

Depends on D11942

Add support for cached token info.

The finalizeTokenArray function will accept an object, cachedTokenInfoById. This object is scanned to see what token info is already in cache. If token info is in this object, then Cashtab will not make an API call to get it.

cacheTokenInfoById will be added to local storage in a later diff on this stack. For now, the function will work even if it is not provided.

Test Plan:
Review unit tests and mocks.
npm start
Send a token tx and confirm tx history and wallet balance update appropriately
Receive a token tx and confirm tx history and wallet balance update appropriately

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Sep 12 2022, 16:30
bytesofmanPushed on Sep 20 2022, 15:27
Reviewer
Restricted Project
Differential Revision
D11960: [Cashtab] [chronik utxo handling p5] Add support for caching token info to limit chronik API calls to unseen tokens
Parents
rABCcc3a2c16d701: [Cashtab] [chronik utxo handling p4] Collect and apply required token metadata
Branches
Unknown
Tags
Unknown