feat: support paykit receiver paths#1066
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Greptile SummaryThis PR adds receiver-path support to Paykit contact payments. The main changes are:
Confidence Score: 4/5The receiver-path flow has state cleanup and marker lifecycle bugs that need fixes before merging.
PrivatePaykitRepo.kt and SettingsViewModel.kt
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/repositories/PrivatePaykitRepo.kt | Adds receiver-path scoping for private Paykit publication, retries, invoices, address reservations, and cleanup; several changed state paths can leave contacts or receiver paths out of later cleanup and rotation. |
| app/src/main/java/to/bitkit/services/PaykitSdkService.kt | Adapts Paykit SDK calls to receiver-path-aware APIs and adds receiver marker publication and discovery helpers. |
| app/src/main/java/to/bitkit/repositories/PublicPaykitRepo.kt | Scopes public contact resolution to the wallet receiver path and centralizes local receiver marker sync. |
| app/src/main/java/to/bitkit/viewmodels/SettingsViewModel.kt | Updates sharing cleanup and marker synchronization, with one path that can remove the marker while private sharing should remain discoverable. |
| app/src/main/java/to/bitkit/usecases/RefreshContactPaykitReceiversUseCase.kt | Adds a targeted receiver refresh use case for rescanning or opening an existing contact. |
Reviews (1): Last reviewed commit: "fix: harden paykit receiver refresh" | Re-trigger Greptile
|
@ben-kaufman I'll review today, please solve the conflict |
48df7a4 to
b9c1a67
Compare
|
Approved with some suggestions |
|
Already asked @piotr-iohk to help with the e2e tests. Since the way we save data changed we need to updated the existing tests to use this new structure with the pre made users |

This PR:
bitkit/walletreceiver.bitkit/walletandbitkit/serverreceivers while keeping one visible contact per Pubky identity.bitkit/walletexplicitly.Description
Paykit now supports multiple apps under one Pubky identity. This change adopts that model without changing Bitkit's contact UI: a person remains one contact, while their saved SDK contact record can track multiple receiver paths.
Private links are maintained for supported receivers that advertise private capabilities. Receiving details are published independently per receiver and only when that receiver can send payments, so a
bitkit/serverreceiver can be discovered and linked without receiving wallet invoices or addresses. Public contact payments and fallback remain scoped tobitkit/wallet.Receiver-record failures are isolated per contact, and rescanning an existing contact refreshes only that contact while showing the validation result immediately.
No migration is included because the receiver-path Paykit state has not shipped and existing development state can be discarded.
Companion iOS PR: synonymdev/bitkit-ios#620
Preview
N/A
QA Notes
Manual Tests
bitkit/walletreceiver is available for payment.bitkit/wallet; public fallback still works when private payment is unavailable.bitkit/serverreceiver is published: the contact remains one row and the new receiver is saved in the background.bitkit/servermarker that cannot send payments: Bitkit may maintain its private link but does not publish wallet invoices or addresses to that receiver.Automated Checks
PrivatePaykitRepoTest.ktandPublicPaykitRepoTest.ktcover receiver-scoped resolution, publication, cleanup, reservations, and fallback behavior.RefreshContactPaykitReceiversUseCaseTest.kt,PrivatePaykitRepoTest.kt, and contact view-model tests cover targeted receiver refresh and per-contact failure isolation.testDevDebugUnitTest,compileDevDebugKotlin, anddetektpassed locally.git diff --checkpassed.