Page MenuHomePhabricator

[Cashtab] Remove legacy utxos state field from useWallet.js
ClosedPublic

Authored by bytesofman on Aug 23 2021, 20:40.

Details

Summary

T1757

utxos is set in state in useWallet.js so that the app can compare the most recently fetched utxo set with the previously fetched utxo set and determine whether or not it has changed, i.e. a transaction was sent or received.

Cashtab has since migrated to keeping wallet state in localstorage, including utxos. Right now the field is duplicated, existing both in wallet.state and in react state for useWallet.js.

This diff replaces the legacy utxos state field with the current wallet.state, so that there is one source of truth.

Test Plan

npm start
Send an XEC tx and note balance change
Send an eToken tx and note balance change
Receive an XEC tx and note balance change + incoming notification
Receive an eToken tx and note balance change + incoming notification

Diff Detail

Repository
rABC Bitcoin ABC
Branch
remove-legacy-utxo-state
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16379
Build 32621: Build Diffcashtab-tests
Build 32620: arc lint + arc unit