[Cashtab] [chronik tx history p20] update token info cache in tx history routine
Summary:
T2447
Depends on D12148
Update token info cache in tx history
I thought this wouldn't be necessary because the token info cache is updated by utxos immediately before tx history is called. However, I fortunately discovered an edge case. You can have a situation where
- Cashtab user in Cashtab wallet Alpha in browser Alpha receives eToken Alpha
- Cashtab user in Cashtab wallet Alpha in browser Alpha burns eToken Alpha or sends it away
- Cashtab user opens Cashtab wallet Alpha in browser Beta. Now that etoken is not in the wallet utxos nor is it in cache of browser Beta. But it's in the tx history. If this isn't handled, it will never be added to cache, and the tx history will not have token decimals, so it will be rendered incorrectly.
This diff uses a similar approach to that used in the chronik utxo implementation.
Test Plan:
Review code changes
Execute the steps above (1, 2, 3)
Check the dev console to verify that Uncached token info found in tx history, adding to cache appears and the token txs are rendered correctly in tx history after ~10 seconds
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D12158