zap-iOS icon indicating copy to clipboard operation
zap-iOS copied to clipboard

Payments authentication toggle setting

Open Jeiwan opened this issue 5 years ago • 2 comments

This PR resolves #269

Description

This PR adds a new setting: Authenticate payments. It's on by default and, when switched off, payments don't require authentication (no need to type PIN or scan biometrics). For security reasons, switching it off requires authentication.

Motivation and Context

Sending many payments can be annoying because each of them requires a PIN or a biometrics scan. Users can opt out of authenticating every payment.

How Has This Been Tested?

Tested in a simulator connected to Simnet. Sent multiple payments with 'Authenticate payments' setting on and off and with fake biometrics authentication on and off .

Screenshots (if appropriate):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

Jeiwan avatar May 11 '20 10:05 Jeiwan

Codecov Report

Merging #340 into master will decrease coverage by 3.73%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #340      +/-   ##
=========================================
- Coverage   10.27%   6.54%   -3.74%     
=========================================
  Files         245     234      -11     
  Lines        8629    8330     -299     
=========================================
- Hits          887     545     -342     
- Misses       7742    7785      +43     
Impacted Files Coverage Δ
Library/Generated/strings.swift 6.97% <ø> (ø)
...y/Scenes/ModalDetail/Send/SendViewController.swift 0.00% <0.00%> (ø)
...y/Scenes/Settings/GroupedTableViewController.swift 0.00% <0.00%> (ø)
...ngs/Items/PaymentsAuthenticationSettingsItem.swift 0.00% <0.00%> (ø)
Library/Scenes/Settings/Settings.swift 0.00% <0.00%> (ø)
...brary/Scenes/Settings/SettingsViewController.swift 0.00% <0.00%> (ø)
...htning/Services/Misc/BlockChainHeightUpdater.swift 80.43% <0.00%> (-15.22%) :arrow_down:
Lightning/Tests/DateEstimatorTests.swift
Library/Tests/SyncPercentageEstimatorTests.swift
Lightning/Tests/LightningInvoiceURITests.swift
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0c914b9...46b7a2d. Read the comment docs.

codecov-io avatar May 13 '20 13:05 codecov-io

That coverage report is wrong, I didn't change anything in BlockChainHeightUpdater.swift.

Jeiwan avatar May 13 '20 13:05 Jeiwan