Page MenuHomePhabricator

[Cashtab] Remove BCH param from wallet derivation
AbandonedPublic

Authored by bytesofman on Dec 1 2022, 15:23.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Summary

T2730

On wallet derivation, do not add multiple address formats.

This is the last thing the BCH param is used for here. It's also unnecessary, as Cashtab is able to function with only the ecash: address and the hash160.

This diff removes the BCH param from the deriveAccount function. This also requires it to be removed from the migrateLegacyWallet function, as that function calls deriveAccount

Dev decision to not migrate existing wallets to this new format. Leaving the other address formats in place does no harm. Enforcing migration has more risk than reward imo.

Test Plan

Review changes to unit tests and npm test
npm start
Create a new wallet
Switch to it
Fund it, send an XEC tx, send an eToken tx
Switch back to former wallet

cd web/cashtab
grep -r wallet.Path1899.legacyAddress src/ yields no output
grep -r wallet.Path1899.fundingAddress src/ yields no output
grep -r wallet.Path1899.slpAddress src/ yields no output

Diff Detail

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