fix: expose rejected incoming payment requests - #1217
Open
ovitrif wants to merge 3 commits into
Open
Conversation
ovitrif
marked this pull request as ready for review
September 2, 2026 00:55
Greptile SummaryThe PR exposes previously silent incoming Paykit request failures while preserving failed requests for manual retry or dismissal.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issue identified. The parsing refactor preserves existing eligibility checks, diagnostics redact counterparties, and the explicit retry sequence matches the documented immediate attempt plus fourteen delayed attempts before terminal feedback.
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/repositories/PaykitPaymentRequestRepo.kt | Refactors request parsing into reason-specific results and adds redacted diagnostics without changing the accepted request contract. |
| app/src/main/java/to/bitkit/repositories/PublicPaykitRepo.kt | Maps endpoint-resolution outcomes to stable incoming-request failure categories. |
| app/src/main/java/to/bitkit/repositories/PrivatePaykitRepo.kt | Preserves presentation errors for the view model instead of logging and obscuring their source locally. |
| app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt | Adds explicit retry exhaustion feedback, request-list restoration, and detailed diagnostics across presentation and decoding failures. |
| app/src/main/java/to/bitkit/ui/screens/paymentrequests/PaymentRequestsScreen.kt | Adds stable test and accessibility tags to request rows and actions. |
| app/src/test/java/to/bitkit/viewmodels/AppViewModelSendFlowTest.kt | Expands regression coverage for retries, terminal feedback, and request-sheet restoration. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Incoming Paykit request] --> B[Parse and validate terms]
B -->|Rejected| C[Record redacted diagnostic]
B -->|Actionable| D[Resolve private payment details]
D -->|Opened| E[Open normal send flow]
D -->|Failed| F{Explicitly opened?}
F -->|No| G[Retry using background cadence]
F -->|Yes, attempts remain| H[Wait two seconds]
H --> D
F -->|Fifteenth failure| I[Show unavailable feedback]
I --> J[Keep request available for retry or dismissal]
Reviews (1): Last reviewed commit: "chore: rename changelog fragment" | Re-trigger Greptile
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.
Fixes #1209
Description
Preview
The existing error toast reports that the payment request is no longer available. The request row remains visible and actionable so the user can retry or dismiss it.
QA Notes
Manual Tests
Automated Checks
PaykitPaymentRequestDiagnosticsTest.kt: verify parse and presentation diagnostics redact valid and invalid counterparties.PaykitPaymentRequestRepoTest.ktandPublicPaykitRepoTest.kt: cover stable parse and resolution failure reasons.AppViewModelSendFlowTest.kt: cover 15 explicit attempts, localized terminal feedback, and request-sheet restoration.PaymentRequestsScreenTest.kt: cover stable request, Pay, and Dismiss accessibility tags; the focused class passes 5/5 on API 37 and 5/5 on API 36.The full two-wallet journey passed on API 37: a delivered 1-sat request became unresolvable after its sender disabled Paykit, produced 15 redacted
resolution_failedattempts, showed terminal feedback, and returned to the request sheet with the same row actionable. The full connected suite remains blocked by the unrelated existingOnchainServiceTests.testDeriveRegtestDescriptorsForSupportedAccountTypesfailure; the focused payment-request UI class passes on API 37 and API 36.