Page MenuHomePhabricator

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

Authored by kieran709 on Feb 22 2022, 17:16.

Details

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.

Diff Detail

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