-
Notifications
You must be signed in to change notification settings - Fork 1
Fix/send manual entry #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR aligns iOS send flow behavior with Bitkit's React Native/Android implementation by adding manual-entry invoice validation and enabling interactive editing from the review screen. The Continue button on manual entry is now gated on successful invoice decode, and users can tap the displayed invoice/address or amount on the review screen to edit them.
Key Changes:
- Manual-entry validation: Continue button is disabled until the entered address/invoice successfully decodes
- Review screen interactivity: Tapping the invoice/address opens the manual-entry editor, tapping the amount returns to the amount screen
- Amount preservation: Previously entered amounts are restored when navigating back to the amount screen
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
AppViewModel.swift |
Adds manual entry validation state (manualEntryInput, isManualEntryInputValid) and async validation logic with sequence-based debouncing |
SendEnterManuallyView.swift |
Implements validation-based Continue button gating using custom binding that triggers async validation on text changes |
SendConfirmationView.swift |
Makes invoice/address and amount displays tappable, adds navigation logic to return to manual entry or amount screens |
SendAmountView.swift |
Restores previously entered amount from wallet.sendAmountSats when navigating back to amount screen |
MoneyStack.swift |
Adds optional onTap callback parameter to support custom tap behavior instead of default currency toggle |
SendOptionsView.swift |
Resets manual entry input state when navigating to manual entry screen |
jvsena42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with valid and invalid parameters:
- Set Bip 21 manually
- Set bolt 11 manually
- Edit amount navigation
| if let amountIndex = navigationPath.lastIndex(of: .amount) { | ||
| navigationPath = Array(navigationPath.prefix(amountIndex + 1)) | ||
| } else { | ||
| if let confirmIndex = navigationPath.lastIndex(of: .confirm) { | ||
| navigationPath = Array(navigationPath.prefix(confirmIndex)) | ||
| } | ||
| navigationPath.append(.amount) | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When paying a Lightning invoice with a fixed amount, it shouldn't be possible to change the amount.
Description
In preparation for the send e2e suite, this PR aligns iOS behavior with Bitkit RN/Android:
ReviewUri) opens the manual-entry editor, tapping the amount (ReviewAmount) returns to the amount screen with the previously entered sats.Linked Issues/Tasks
Screenshot / Video
Simulator.Screen.Recording.-.iPhone.17.-.2025-12-12.at.11.32.55.mov
Simulator.Screen.Recording.-.iPhone.17.-.2025-12-12.at.11.41.47.mov
Simulator.Screen.Recording.-.iPhone.17.-.2025-12-12.at.11.33.52.mov
Simulator.Screen.Recording.-.iPhone.17.-.2025-12-12.at.12.19.02.mov