fix: add quickpay daily spend limit - #1159
Open
ovitrif wants to merge 10 commits into
Open
Conversation
9 tasks
Greptile SummaryThe PR restores payment authentication for QuickPay-eligible payments when both the app PIN and PIN-for-payments setting are enabled.
Confidence Score: 5/5The PR appears safe to merge, with protected QuickPay-eligible payments correctly redirected into the existing authenticated confirmation flow. The new eligibility condition is consistent with the confirmation screen’s authentication gate, and the changed tests cover both protected and unprotected settings as well as deferred processing after unlock.
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt | Adds a centralized eligibility guard that prevents QuickPay when payment authentication is enabled and falls through to the existing authenticated Confirm flow. |
| app/src/test/java/to/bitkit/viewmodels/AppViewModelSendFlowTest.kt | Updates send-flow coverage to verify protected payments skip QuickPay while preserving QuickPay when payment authentication is disabled. |
| changelog.d/next/require-payment-pin.security.md | Accurately documents that QuickPay now honors the payment-PIN setting. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[QuickPay-eligible payment] --> B{QuickPay enabled and amount nonzero?}
B -- No --> C[Open Confirm]
B -- Yes --> D{PIN and PIN for payments enabled?}
D -- Yes --> C
D -- No --> E{Amount within QuickPay threshold?}
E -- Yes --> F[Open QuickPay]
E -- No --> C
C --> G[Swipe to pay]
G --> H[PIN or biometric authentication]
H --> I[Submit payment]
Reviews (1): Last reviewed commit: "fix: require payment pin for quickpay" | Re-trigger Greptile
ovitrif
force-pushed
the
fix/require-payment-pin-for-quickpay
branch
from
August 15, 2026 18:28
0807618 to
2e4a4c0
Compare
ovitrif
force-pushed
the
fix/require-payment-pin-for-quickpay
branch
from
August 15, 2026 23:03
2e4a4c0 to
7b9ea19
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1158.
iOS port: synonymdev/bitkit-ios#670.
QuickPay stays PIN-free under limits (the point of QuickPay). A hard payment-PIN skip would remove that behavior, so this PR bounds auto-pay with a daily spend multiplier instead. Payments above the daily cap open Confirm, where PIN for payments still applies. Lock-time deferral remains in #1158.
Description
1,3,5,10,50; default5)threshold × multiplier(USD); spend resets on the local calendar dayflowchart TD incoming[Payment request] locked{App unlocked?} qpOn{QuickPay on and amount at or under per-tx threshold?} daily{spentTodayUsd plus amountUsd at or under dailyCapUsd?} quickpay[QuickPay auto-pay no PIN] confirm[Confirm then payment PIN if enabled] queue[Defer until unlock] incoming --> locked locked -->|no| queue queue --> locked locked -->|yes| qpOn qpOn -->|no| confirm qpOn -->|yes| daily daily -->|yes| quickpay daily -->|no| confirmPreview
QA Notes
$copy updatesAppViewModelSendFlowTest.kt,CacheStoreTest.kt