HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Joey King <joseph.roy.king@gmail.com>Authored on Aug 23 2021, 20:36
bytesofmanPushed on Aug 23 2021, 22:09
Reviewer
Restricted Project
Differential Revision
D9912: [Cashtab] Remove legacy utxos state field from useWallet.js
Parents
rABC499e5752b3cf: [Cashtab] Deprecate obsolete websocket support
Branches
Unknown
Tags
Unknown