HomePhabricator

[Cashtab] Do not open scanner on Send screen when value and address are…

Description

[Cashtab] Do not open scanner on Send screen when value and address are prepopulated

Summary: When clicking reply, the camera does not need to open as the address has been prepopulated. Added logic to DestinationAddressSingle's loadWithCameraOpen prop to check for location, location.state & location.state.replyAddress. If these elements are present, loadWithCameraOpen is set to false, otherwise it is set to scannerSupported. Related to task T2261.

Test Plan:
cd web/cashtab
npm start
Use browser's developer tools to set screen width to meet the mobile threshold.
You may need to reset camera permissions for the page.
From the wallet tab, click on reply, ensure that scanner opens when the formData fields are empty.
Navigate back to the wallet tab.
If you do not have a tx in your wallet's tx history that has a message you can reply to, send a tx with a message to the wallet.
Click reply on the message and ensure that the camera does not open when the formData fields are prepopulated.

Reviewers: bytesofman, emack, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
kieran709Authored on Feb 22 2022, 17:07
kieran709Pushed on Feb 23 2022, 17:19
Reviewer
Restricted Project
Differential Revision
D11096: [Cashtab] Do not open scanner on Send screen when value and address are prepopulated
Parents
rABC569ceb1499ff: Run the activated tests using the next upgrade
Branches
Unknown
Tags
Unknown