fix: establish private Paykit links promptly - #1141
Open
ben-kaufman wants to merge 3 commits into
Open
Conversation
ben-kaufman
force-pushed
the
codex/paykit-fast-private-link
branch
from
August 6, 2026 15:34
6a37c34 to
266f7b2
Compare
ben-kaufman
marked this pull request as ready for review
August 6, 2026 15:39
Greptile SummaryThe PR accelerates discovery and establishment of private Paykit links and refreshes incoming payment requests during the same bounded synchronization window.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/repositories/PrivatePaykitRepo.kt | Adds bounded private-link synchronization, receiver-path discovery and persistence, lifecycle cleanup, and burst notifications. |
| app/src/main/java/to/bitkit/usecases/RefreshContactPaykitReceiversUseCase.kt | Starts the synchronization burst after a successful explicit contact receiver refresh. |
| app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt | Connects synchronization bursts to lifecycle and connectivity events and adds immediate bounded payment-request polling. |
| app/src/test/java/to/bitkit/repositories/PrivatePaykitRepoTest.kt | Covers discovery, persistence, and private link establishment for a receiver path published after contact creation. |
| app/src/test/java/to/bitkit/usecases/RefreshContactPaykitReceiversUseCaseTest.kt | Verifies burst startup occurs only after successful contact receiver refresh. |
| app/src/test/java/to/bitkit/viewmodels/AppViewModelSendFlowTest.kt | Updates request-polling coverage for immediate and periodic refresh behavior. |
| changelog.d/next/1141.fixed.md | Documents the reduced delay for private payment requests. |
Sequence Diagram
sequenceDiagram
participant Event as Contact / Foreground / Network Event
participant VM as AppViewModel
participant Repo as PrivatePaykitRepo
participant Pubky as PubkyService
participant Paykit as Paykit SDK
participant Requests as PaymentRequestRepo
Event->>VM: Trigger private synchronization
VM->>Repo: startInitialLinkBurst(contactKeys)
loop Every 2 seconds for bounded window
Repo->>Pubky: discoverRelevantReceiverPaths(contact)
Pubky-->>Repo: Supported receiver paths
Repo->>Pubky: Persist newly discovered paths
Repo->>Paykit: Ensure private links/endpoints
VM->>Requests: Refresh incoming requests
end
Reviews (2): Last reviewed commit: "fix: stop retrying removed paykit reques..." | 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.
Description
bitkit/server.Preview
No UI changes.
QA Notes
Regression coverage verifies that a contact saved with only
bitkit/walletlater discoversbitkit/server, persists it, callsensureLinkWithPeer, and never starts public payment resolution. Existing send-flow coverage now also verifies that Payment Request polling refreshes immediately when activated.CI is the authoritative Android build/test run because the native GitHub Packages dependencies require repository package credentials.