Repository navigation
feat: wake the wallet to claim swaps - #1387
Draft
coreyphillips wants to merge 1 commit into
Draft
coreyphillips wants to merge 1 commit into
coreyphillips wants to merge 1 commit into
Conversation
3 tasks
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 #1238
Twin: synonymdev/bitkit-android#1991
Dependency: synonymdev/bitkit-core#223
Stacked on #1386; I'll retarget to
masteronce it merges. Pins bitkit-core0.8.0-swaps.12, a prerelease of rc15 plus synonymdev/bitkit-core#223, until a release includes it.Description
swap.claimablegrant for its registeredpk:identity, elseln:, and bitkit-core hands it to the provider. Only a registered install with notifications on gets one. Only the grant id is kept, never the token.swap.claimablewake advances every open swap for up to 18 s and is acknowledgedhandledonce a claim goes out or no swap is left open, elsefailed. The swaps then keep advancing in the background. The notification extension does not handle it.Out of Scope
paykit.sync), phase 3 of feat: adopt the wake gateway for background pushes #1238.Design
N/A: no UI changes.
Preview
N/A
QA Notes
Setup
As #1386, plus a registered install (Dev Settings, Wake shows the device) on a gateway the provider allowlists (
--wake-gateway), and notifications on.Journeys
N/A: not drivable; see Manual Tests.
Manual Tests
wake statusshows it ackedhandled.Automated Checks
PubkySwapsWakeGrantsTests.swift: grant gating, thepk:thenln:recipient, the token and expiry the provider receives, and revoking on refusal, on an already claimable swap, on a swap that ended meanwhile, on finish and on wipe.PubkySwapsTrackerTests.swift: a finished swap revokes its grant; the claimable wake's outcomes.WakeReceiverTests.swift: the app registry handlesswap.claimable.Evidence
799bd8e, iPhone 17 simulator, bitkit-core 0.8.0-swaps.12: SwiftFormat lint passes; the CI test selection passes (4,182 unit tests).Gaps
failedand the swap claims on the next launch.