fix: require private Paykit auth scope - #1131
Conversation
Greptile SummaryThe PR strengthens watch-only Paykit authorization and aligns local E2E Pubky connectivity with Android emulator networking.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/models/PubkyAuthRequest.kt | Requires the public and private watch-only scopes and compares their capability set independently of ordering. |
| app/src/main/java/to/bitkit/services/PaykitSdkService.kt | Shares Pubky client configuration across bootstrap and SDK construction, applying the emulator host only for local E2E runs. |
| app/build.gradle.kts | Changes the default local E2E Homegate endpoint from device loopback to the Android emulator host alias. |
| gradle/libs.versions.toml | Upgrades the Paykit Android dependency to the release containing the new Pubky client configuration APIs. |
Reviews (2): Last reviewed commit: "chore: update paykit to rc42" | Re-trigger Greptile
57be595 to
1c26b33
Compare
f3d6c70 to
a45a301
Compare
jvsena42
left a comment
There was a problem hiding this comment.
Reviewed and validated locally on this branch.
Validation
| Check | Result |
|---|---|
just lint (detekt) |
BUILD SUCCESSFUL — 10 warnings, all in files untouched by this PR (WalletRepo, BackupRepo, TrezorPreviewData, …). Zero new warnings introduced. |
just test |
BUILD SUCCESSFUL, 0 failures |
Targeted --rerun-tasks on PubkyAuthRequestTest, PaykitSdkServiceTest, PubkyRepoTest, PubkyAuthApprovalViewModelTest |
all PASSED, including both new tests |
E2E=true GEO=false ./gradlew assembleDevDebug |
built successfully (dependency resolution works here, so the blocker noted in the description looks machine-local) |
| Install + launch on an emulator | no crash, no UnsatisfiedLinkError — the rc42 native lib loads and the new FFI entry points resolve |
Runtime confirmation the new config actually takes effect (logcat):
I/paykit: pubky::client::core: Configuring testnet builders for host 10.0.2.2
I also confirmed the motivation for the host change is real: bitkit-e2e-tests/ci_run_android.sh reverse-forwards 60001 / 9735 / 30001 but not 6288, so 127.0.0.1:6288 was genuinely unreachable in CI.
Inline comments below — one correctness issue worth fixing before merge (the reorder test), plus some local-E2E ergonomics and nits.
Description
10.0.2.2)0.1.0-rc42and setlocalTestnetHostto10.0.2.2for local E2E buildsPaykit
0.1.0-rc42is published for Android and iOS. The local test environment fixes are in pubky/locks#11.Preview
N/A — no user-facing UI changes.
QA Notes
./gradlew detektpassed; reported only existing unrelated warnings.E2E_HOMEGATE_URLand confirm both Homegate and Paykit resolve through10.0.2.2.