Skip to content

[codex] add public contact payments#924

Open
ben-kaufman wants to merge 29 commits intomasterfrom
codex-public-payments-contacts
Open

[codex] add public contact payments#924
ben-kaufman wants to merge 29 commits intomasterfrom
codex-public-payments-contacts

Conversation

@ben-kaufman
Copy link
Copy Markdown
Contributor

@ben-kaufman ben-kaufman commented Apr 30, 2026

Description

Adds public Paykit payments to contacts on Android, matching the iOS public payments flow and the Paykit endpoint identifier spec.

  • Publishes and removes spec-compliant Paykit payment endpoints for the current wallet.
  • Adds payment discovery and launch flows for Add Contact and Contact Detail.
  • Adds contact-tagged activity support and a contact activity screen.
  • Threads contact context through immediate and pending send flows.
  • Adds duplicate-contact validation parity and repo-level Paykit tests.
  • Updates Paykit and bitkit-core bindings for the required endpoint and contact APIs.

Preview

N/A

QA Notes

Suggested reviewer checks:

  • On the first-time Pay Contacts screen, choose enabled and continue; verify public endpoints are published for the current pubky.
  • On a fresh first-time Pay Contacts path, choose disabled and continue; verify no public endpoints are published.
  • Pay a saved contact with public endpoints from Add Contact and Contact Detail.
  • Verify sent/pending contact payments attach activity to the contact.
  • Verify Contact Activity shows Sent to {name} / Received from {name} titles.
  • Paste or scan a pubky and verify routing to profile, existing contact, or add contact as appropriate.

@ben-kaufman ben-kaufman force-pushed the codex-public-payments-contacts branch from 0a2aea4 to c005917 Compare April 30, 2026 17:41
@ben-kaufman ben-kaufman marked this pull request as ready for review April 30, 2026 18:00
Comment thread CHANGELOG.md Outdated
Comment thread app/src/test/java/to/bitkit/repositories/PublicPaykitRepoTest.kt Outdated
Comment thread app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt Outdated
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@claude

This comment has been minimized.

@ovitrif ovitrif added this to the 2.3.0 milestone May 1, 2026
@claude

This comment has been minimized.

@claude

This comment has been minimized.

Comment thread app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt
Comment thread app/src/main/java/to/bitkit/usecases/WipeWalletUseCase.kt Outdated
@piotr-iohk
Copy link
Copy Markdown
Collaborator

Quick testing notes:

  • Was able to Send onchain to contact 👍
  • Failed to send lightning to contact

logs.zip

Screen.Recording.2026-05-04.at.22.14.04.mov

Screenshot 2026-05-04 at 22 05 32
Screenshot 2026-05-04 at 22 06 32
  • Contact activity only shows Sent to - but does not show Received from . Also on main activity "Received from..." is not displayed.(on both Android and iOS)
Screenshot 2026-05-04 at 22 10 52

@ovitrif
Copy link
Copy Markdown
Collaborator

ovitrif commented May 4, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a25b62edc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +231 to +236
if (refresh) {
lightningRepo.executeWhenNodeRunning(
operationName = "sync public Paykit endpoints",
) {
Result.success(Unit)
}.getOrThrow()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove unconditional node-running gate before endpoint build

syncPublishedEndpoints(publish = true) now always calls buildWalletEndpoints(refresh = true), and this block hard-fails unless the Lightning node is running. That prevents enabling public contact payments even when an on-chain address is already available, because the method throws before it even checks walletState.onchainAddress. In practice, users who toggle sharing while the node is stopped will get an error and cannot save the setting, despite having a valid publishable endpoint.

Useful? React with 👍 / 👎.

@ben-kaufman
Copy link
Copy Markdown
Contributor Author

@piotr-iohk payment issue with LN seems like RGS error from the logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants