[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:
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D15224