HomePhabricator

[Cashtab] Update ScanQRCode.js

Description

[Cashtab] Update ScanQRCode.js

Summary:
T3387

Upgrade to latest available zxing. Update component logic to work with latest zxing.

Test Plan:
npm test

Navigate to https://cashtab-local-dev.netlify.app/ which deploys this diff
Scan a QR code of an ecash address
Scan a QR code of a bip21 string, try entering ecash:qp89xgjhcqdnzzemts0aj378nfe2mhu9yvxj9nhgg6?amount=17&op_return_raw=04007461622263617368746162206D6573736167652077697468206F705F72657475726E5F726177 at https://www.qr-code-generator.com/
Scan a QR code of a URL and verify you get a validation error

Unfortunately I'm not able to mock an error thrown by the camera. Manually test that the camera modal goes away and the error msg is rendered by

  • change line 47 of ScanQRCode.js from if (error instanceof NotFoundException) { to if (!(error instanceof NotFoundException)) {
  • npm start

screenshot rel:

image.png (197×391 px, 11 KB)

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
bytesofmanAuthored on Jan 23 2024, 23:13
bytesofmanPushed on Jan 25 2024, 14:17
Reviewer
Restricted Project
Differential Revision
D15224: [Cashtab] Update ScanQRCode.js
Parents
rABC18837ee9df5b: miner: Make mempool optional for BlockAssembler
Branches
Unknown
Tags
Unknown