Page MenuHomePhabricator

[Cashtab] [proof of concept] Deprecating legacy address formats
AbandonedPublic

Authored by bytesofman on Nov 8 2022, 10:54.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Summary

T2730

Proof of concept diff to derive addresses direct from node.

The current address system in Cashtab has been iteratively built up over a long history of weirdness, including both the rebrand and its new address format and the legacy approach of bch-api which required bitcoincash: and simpleledger: addresses in some cases to broadcast a tx.

Now that things are more clear, the address generation and organization process should be streamlined.

This diff derives the hash160 direct from the node object and also gets to the ecash: address from this point. This will later be reworked as a stacked diff that removes all use of bitcoincash: and simpleledger: addresses from Cashtab.

I think it makes sense to work this through after the D12414 stack.

Test Plan

Comment out line 780 in useWallet.js. This allows you to run the wallet creation function and print info to console without actually creating a wallet.
npm start
On the settings page, click 'New Wallet'. Check the dev console to see that generated ecash address is valid.

Note: this diff will be abandoned and reworked as a stacked diff

Diff Detail

Repository
rABC Bitcoin ABC
Branch
deprecate-bch-address-methods
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20826
Build 41311: Build Diffcashtab-tests
Build 41310: arc lint + arc unit

Event Timeline

looks good, I've also started using the hash160BufferFromNode approach above to get cash address from the node object in D12447, rather than using base58check functions from external libraries

Addresses are no longer derived from the BCH param