HomePhabricator

[Cashtab][Swap] Add swap component with SideShift integration

Description

[Cashtab][Swap] Add swap component with SideShift integration

Summary:
T3322

For reals this time.

Adds the Swap component with SideShift being the first cab off the rank.

The SideShift button is also accessible on the Home onboarding screen when the user creates a new wallet with a zero balance.

In terms of the user closing the widget in the middle of a shift transaction (accidentally or otherwise), re-opening it via the same button will display the previous ongoing transaction for the user to complete the shift.

Test Plan:

  • npm test
  • npm start
  • Create a fresh new wallet and observe the Exchange to XEC via SideShift button is rendered on the onboarding Home screen. Click it and observe successful rendering of the SideShift widget overlay.
  • Switch to an existing wallet with tx history and observe the Exchange to XEC via SideShift button is not rendered on the Home screen and instead has the expected Tx History displayed
  • Click on the hamburger menu and navigate to the Swap component. Observe the balance header is displayed and then open the SideShift dropdown and click the button to render the SideShift widget overlay
  • Start an USDT to XEC swap process Waiting for you to send USDT..., close the SideShift widget overlay, then re-click the Open SideShift button and ensure the previous incomplete swap process is still displayed.
  • Complete the USDT to XEC swap process and ensure the exchanged XEC is sent to the designated settlement eCash address.

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Subscribers: Mengerian

Differential Revision: https://reviews.bitcoinabc.org/D14708

Details

Provenance
emackAuthored on Oct 31 2023, 06:45
emackPushed on Nov 8 2023, 23:47
Reviewer
Restricted Project
Differential Revision
D14708: [Cashtab][Swap] Add swap component with SideShift integration
Parents
rABC81be7b59d93e: [net processing] Remove CNode::nLocalServices
Branches
Unknown
Tags
Unknown