Page MenuHomePhabricator

[Cashtab] Tx History should immediately update to include newly added contacts
ClosedPublic

Authored by kieran709 on Oct 7 2022, 20:19.

Details

Summary

Related to T2724. Changed logic in updateContactListInLocalForage to setContactList(contactListArray), leveraging Context to make the new contactList immediately available to the Tx component. Renamed updateContactListInLocalForage to updateContactList.

Test Plan

cd web/cashtab && npm start
from TxHistory, expand a Tx from a non-contact
click the Add To Contacts button
navigate back to TxHistory
observe that 'from newContact' appears on Txs from the new contact

navigate to the configure screen
delete the new contact
navigate back to TxHistory
observe that 'from newContact' no longer appears on Txs from the (former) new contact

grep -r 'updateContactListInLocalForage' src/ should return no results.

Diff Detail

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

Event Timeline

bytesofman requested changes to this revision.Oct 7 2022, 21:21
bytesofman added inline comments.
web/cashtab/src/hooks/useWallet.js
296 ↗(On Diff #35531)

rename this function to convey the change in behavior

I think just updateContactList is good now, since it's updating it in 100% of places where it's kept

This revision now requires changes to proceed.Oct 7 2022, 21:21

Responding to review feedback

kieran709 edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Oct 11 2022, 16:22