Page MenuHomePhabricator

[Cashtab] Remove BCH param from wallet derivation p8 - Path899 migration support
AbandonedPublic

Authored by bytesofman on Dec 3 2022, 16:43.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

T2832

Depends on D12743

Ensure Cashtab receive address and change address are Path 899. In this way, Cashtab wallets will eventually keep utxos on Path899 instead of Path1899

This same procedure was used to migrate away from Path145 and Path245. Both paths will need to be supported indefinitely, but actively used wallets will soon move to Path 899.

This diff unconvered a bug in how tx history is processed. Because tx history can return duplicate txids for txs that involve the same address, such duplicates need to be removed. This edge case was not detected until now because Cashtab txs would need to be manually constructed to involve txs at both Path145 and Path1899. This feature will be needed for HD wallets. It must be added here to avoid bugs from sending txs from Path1899 with change to Path899.

Test Plan

Review new functions and unit tests. npm test
npm start
Navigate to Receive page and confirm Path899 address is shown.
Send an XEC tx. Check on block explorer. Change goes to Path 899.
Confirm balance updates appropriately.
Send a tx to your Path899 address. Confirm balance updates appropriately and notification.
Send many XEC and eToken txs. Confirm change goes to Path 899.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
remove-bch-from-derivewallet
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21340
Build 42330: Build Diffcashtab-tests
Build 42329: arc lint + arc unit

Event Timeline

When I started this diff, I did not realize we would need a new suite of functions to remove duplicate txids. Need to review, remove debug logging, and potentially split into more diffs. However, wanted to save my work.

To be superseded by diffs coming from T2836