Skip to content

feat: add BTCPay wallet connection#561

Merged
ben-kaufman merged 9 commits into
masterfrom
codex/samrock-onchain
Jun 1, 2026
Merged

feat: add BTCPay wallet connection#561
ben-kaufman merged 9 commits into
masterfrom
codex/samrock-onchain

Conversation

@ben-kaufman
Copy link
Copy Markdown
Contributor

@ben-kaufman ben-kaufman commented May 21, 2026

Description

This PR:

  1. Adds BTCPay setup-link handling from scanner paste and deep links, with a review sheet before connecting.
  2. Registers the current wallet's on-chain descriptor through BitkitCore 0.1.60, using the selected address type at connection time.
  3. Adds response parsing, local-development HTTP handling, safer deep-link logging, localization, and focused setup parsing coverage.

Linked Issues/Tasks

N/A

Screenshot / Video

bitkit-btcpay-samrock-e2e-proof-framed-20260521.webm

QA Notes

Manual Tests

  • 1. BTCPay store -> setup QR -> Bitkit Scanner paste: Connect BTCPay sheet opens with the store host and requested methods.
  • 2. Connect BTCPay sheet -> Connect: setup completes, the sheet closes, and a success toast is shown.
  • 3. Bitkit Receive -> BTCPay BTC wallet address list: the receive address shown in Bitkit matches the address derived by BTCPay.
  • 4. regression: Scanner -> paste a non-BTCPay QR: existing scanner routing still handles the QR normally.

Automated Checks

  • git diff --cached --check
  • SwiftFormat run on touched Swift files.
  • Swift parse check passed for touched Swift files.
  • plutil -lint Bitkit/Resources/Localization/en.lproj/Localizable.strings
  • Old-Xcode E2E simulator build passed with E2E_BUILD, E2E_BACKEND=network, E2E_NETWORK=regtest, and BitkitCore 0.1.60.
  • Unit tests added: cover setup URL parsing, selected address type mapping, local HTTP handling, and response parsing in BitkitTests/SamRockSetupRequestTests.swift.
  • node scripts/validate-translations.js is currently blocked locally by the missing glob package.

@ben-kaufman ben-kaufman force-pushed the codex/samrock-onchain branch from 4eea083 to 364546a Compare May 21, 2026 14:29
@ben-kaufman ben-kaufman marked this pull request as ready for review May 21, 2026 19:26
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: 7e6b742fe2

ℹ️ 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 thread Bitkit/Services/SamRockService.swift Outdated
@ben-kaufman ben-kaufman force-pushed the codex/samrock-onchain branch from 3c54d37 to 50cba05 Compare May 22, 2026 17:31
@jvsena42
Copy link
Copy Markdown
Member

code LGTM, testing...

jvsena42
jvsena42 previously approved these changes May 26, 2026
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 left a comment

Choose a reason for hiding this comment

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

Tested on local regtest server

  • Connect to wallet
  • Get and address from BTC pay server
  • Pay
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2026-05-26.at.14.56.44.mp4
Image

ovitrif
ovitrif previously approved these changes May 29, 2026
Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

utAck

Depending on which PR gets merged first, this one might need update to Bitkit-core 64 if merging later than the ones set on auto-merge. For that reason I won't set this to auto-merge, there will be conflicts in there anyways whichever goes first.

@ovitrif ovitrif added this to the 2.3.0 milestone May 30, 2026
@ben-kaufman ben-kaufman dismissed stale reviews from ovitrif and jvsena42 via 0c14369 June 1, 2026 13:20
@ben-kaufman ben-kaufman force-pushed the codex/samrock-onchain branch from 50cba05 to 0c14369 Compare June 1, 2026 13:20
@ovitrif ovitrif self-requested a review June 1, 2026 18:35
Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

utAck

@ben-kaufman ben-kaufman merged commit 3386cf5 into master Jun 1, 2026
19 of 29 checks passed
@ben-kaufman ben-kaufman deleted the codex/samrock-onchain branch June 1, 2026 19:09
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