Repository navigation
feat: wake the wallet to claim pubky swaps - #1991
Draft
coreyphillips wants to merge 3 commits into
Draft
coreyphillips wants to merge 3 commits into
coreyphillips wants to merge 3 commits into
Conversation
3 tasks
Contributor
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
This branch has not been deployed
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.
Part of #1804
Twin: synonymdev/bitkit-ios#1387
Dependency: synonymdev/bitkit-core#223
Pins bitkit-core
0.8.0-swaps.12, a prerelease of rc15 plus synonymdev/bitkit-core#223, until a release includes it.Description
PubkySwapsRouteRepocreates a 2-dayswap.claimablegrant for the registeredpk:identity, elseln:, and bitkit-core hands it to the provider. Only an opted-in install with a gateway registration gets one. Only the grant id is kept, never the token.SwapClaimableWakeHandleradvances every unfinished swap every 3 s for up to 2 minutes and ackshandledonce a claim goes out or no swap is left open, elsefailed. The swaps then keep advancing in the background.Out of Scope
paykit.sync), phase 3 of feat: adopt the wake gateway for background pushes #1804.Design
N/A: no UI changes.
Preview
N/A
QA Notes
Setup
A regtest build on a device with Background Payments on and the install registered (Dev Settings, Wake), a Pubky Swaps provider that allowlists the gateway (
--wake-gateway), and a contact reachable only on chain.Journeys
N/A: not drivable; see Manual Tests.
Manual Tests
wake statusshows it ackedhandled. Needs a gateway wake, not in Capabilities.Automated Checks
WakeRepoTest.kt: grant gating, thepk:thenln:recipient, and revoking on the gatewayWakeHandlersTest.kt: aswap.claimablewake ackshandledorfailedPubkySwapsRouteRepoTest.kt: the grant handed over, refused, already claimable and revoked when the swap ends; the claimable wake's outcomes; every test stops the repo's background loops before it endsEvidence
eb27d5e, published bitkit-core 0.8.0-swaps.12 with strict verification:compileDevDebugKotlin,testDevDebugUnitTest(6296 passed, 0 failed),detektandlintDevDebugpass;just depspasses.eb27d5e: build, unit tests, compose UI tests, lint and detekt passed.Gaps