Page MenuHomePhabricator

[Cashtab] Deprecate the auto-open camera on send feature
AcceptedPublic

Authored by bytesofman on Sun, Jan 26, 18:12.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Summary

The intended use case here of "it's common for people to send to a QR code most of the time they open the mobile app" has not really materialized. So, we are seeing more issues than benefit.

Deprecate the feature. Do not modify the default settings object, as we may wish to bring this back at a later date, and keeping one extra key in storage is nbd.

The "isMobile" function is no longer used in the app. However, there are no dependencies in it, and imo we could reasonably expect to use this function soon. Imo worth keeping in the codebase.

Test Plan

npm test

grep -r loadWithScannerOpen src/ and no output

Diff Detail

Repository
rABC Bitcoin ABC
Branch
no-autoopen
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32217
Build 63924: Build Diffcashtab-tests
Build 63923: arc lint + arc unit

Event Timeline

Tail of the build log:

/work/modules/ecash-agora /work/abc-ci-builds/cashtab-tests

added 364 packages, and audited 367 packages in 2s

60 packages are looking for funding
  run `npm fund` for details

2 vulnerabilities (1 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-agora@0.3.1 build
> tsc && tsc -p ./tsconfig.build.json

/work/cashtab /work/abc-ci-builds/cashtab-tests
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated eslint@8.56.0: This version is no longer supported. Please see https://eslint.org/version-support for other options.

added 1494 packages, and audited 3315 packages in 25s

320 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (6 moderate, 2 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> cashtab@3.12.13 build
> node scripts/build.js

Creating an optimized production build...

Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.

Failed to compile.

[eslint] 
src/components/Configure/Configure.tsx
  Line 19:10:  'isMobile' is defined but never used  @typescript-eslint/no-unused-vars

src/components/Etokens/Token/index.tsx
  Line 396:11:  'openWithScanner' is assigned a value but never used  @typescript-eslint/no-unused-vars

src/components/Send/SendXec.tsx
  Line 246:11:  'openWithScanner' is assigned a value but never used  @typescript-eslint/no-unused-vars


Build cashtab-tests failed with exit code 1

remove unused vars, build lint

This revision is now accepted and ready to land.Mon, Jan 27, 07:23