Page MenuHomePhabricator

[Cashtab] [Remove BCH param from wallet derivation p1] Remove use of slpAddress from Cashtab
ClosedPublic

Authored by bytesofman on Dec 4 2022, 11:32.

Details

Summary

T2836

Remove use of legacy address types from Cashtab as prep for removing them from wallet object

Currently, only wallet.Path1899.slpAddress is used anywhere in the app. Remove it.

Test Plan

npm start
Send an airdrop with 'Ignore my own address' checked
Confirm it ignores your address
grep -r wallet.Path1899.slpAddress src/ and no result
grep -r wallet.Path1899.legacyAddress src/ and no result
grep -r wallet.Path1899.fundingAddress src/ and no result

Diff Detail

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

Event Timeline

emack requested changes to this revision.Dec 4 2022, 12:22
emack added a subscriber: emack.
emack added inline comments.
web/cashtab/src/components/Airdrop/Airdrop.js
244 ↗(On Diff #36947)

The problem with changing it to cashAddress above is that the airdropList array (outputs from eToken-list library) contains etoken addresses (not ecash: ), therefore it fails to find the corresponding etoken address to delete from the array.

Would suggest getting rid of ownEtokenAddress altogether since it's only used here, and to do something like:

if (ignoreOwnAddress) {

airdropList.delete(
    convertEcashtoEtokenAddr(
        ownEcashAddress
    )
);

}

This revision now requires changes to proceed.Dec 4 2022, 12:22

Patching bug discovered in review

web/cashtab/src/components/Airdrop/Airdrop.js
244 ↗(On Diff #36947)

Good catch, patched

This revision is now accepted and ready to land.Dec 4 2022, 23:18