fix: cap number pad on remaining amount screens - #2
Closed
CypherPoet wants to merge 1 commit into
Closed
Conversation
Applies the maxAmountOverride cap (from the send-amount fix) to the LNURL pay/withdraw, spending, advanced-spending, and manual channel-funding screens, so the number pad refuses entry above each screen's contextual maximum. FundManualAmountView also gains the previously-missing upper-bound button validation, which let users proceed above the fundable balance. Receive and CJIT amount screens are intentionally left uncapped (a receive amount has no balance ceiling).
4 tasks
Owner
Author
|
Re-opened upstream as synonymdev#585. Closing this fork self-review PR. |
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.
Depends on
This PR is based on #4's branch (
fix/send-amount-cap,fix: cap send amount pad at available balance), which introduces themaxAmountOverridemechanism it reuses. It targets that branch as its base, so the diff below shows only this PR's changes. Merge/land #4 first, then re-target this tomaster.Description
Building on the send-amount cap (synonymdev#346), this PR applies the same number-pad cap to the other amount-entry screens that have a contextual maximum: LNURL pay, LNURL withdraw, transfer-to-spending, advanced spending, and manual external channel funding. Each now refuses entry above its limit instead of relying on the Continue button alone.
It also closes a gap on the manual external-funding screen, where Continue stayed enabled for amounts above the fundable balance; that screen is now gated on the available balance like the others.
The receive and CJIT amount screens are intentionally left uncapped: a receive amount has no balance ceiling.
Linked Issues/Tasks
Related: synonymdev#346
Screenshot / Video
QA Notes
Manual Tests
regression:Receive / CJIT Amount: no upper cap; any amount can still be entered.Automated Checks
BitkitTests/NumberPadTests.swift(added in fix: cap send amount pad at available balance #4); these screens are view-level wiring plus one button-validation fix, verified by build + manual QA.BitkitTests/NumberPadTestspasses (24 tests).