[Cashtab] Deprecate BCH from parseChronikTx
Summary:
T2730
After some wallet improvements, we now have a local function that converts hash160 to ecash: address. Implement this in parseChronikTx in place of the BCH method.
Note: A couple of bugs were uncovered here that had been lurking behind the need to mock address conversions using the legacy method.
- The app was calculating replyAddress for every input, not just the first input, and thereby using the last one.
- The app was mocking and returning the wrong replyAddress for the swap tx unit test
While 1. above could have been fixed in a stacked diff on top of this, it would have required changing the wrong mock to another wrong mock. Not wishing to intentionally introduce an error, fix is included here.
Test Plan:
Review changes to parseChronikTx and npm test
Inspect https://explorer.e.cash/tx/2f030de7c8f80a1ecac3645092dd22f0943c34d54cb734e12d7dfda0641fdfcf and confirm it now lines up with its unit test
npm start
Receive an XEC msg transaction
Reply to it
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Subscribers: emack
Differential Revision: https://reviews.bitcoinabc.org/D12780