Conversation
7 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.
Depends on pubky/paykit-rs#161 (open; head 8b893f0, the top of the #158 → #159 → #160 → #161 stack). The Xcode project points at a local checkout of pubky/paykit-rs beside this one (
../paykit-rs) that builds the Swift bindings and xcframework from that head, instead of the published0.1.0-rc55tag, so CI cannot build this branch until #161 is published.Stacked on #798: the allowance tests prove that admission ignores the demo clock, so the branch starts from that commit and GitHub retargets this PR to master when it merges.
Android port: synonymdev/bitkit-android#1340
This PR adds allowances: a payer sets a per-payment and a monthly limit for a Paykit contact, and that contact's requests within the limits are paid without asking.
Description
Out of Scope
Design
Figma "Bitkit - Experimental New": Allowances empty state, Set Allowance, Allowances list. The receiver's review sheet and the detail sheet have no frame and follow the drawn film. Deliberate differences: the first tab stays "Overview", the list row's right column reads the monthly limit, and the copy typos are fixed.
Preview
Screenshots follow before review.
QA Notes
Journeys
set-and-accept.xml— the offer opens on the payee by itself and both rows turn Activeauto-pay-under-limit.xml— a $2 request pays itself with only a Payment Executed notificationabove-limit-asks.xml— a $20 request arrives as an ordinary Payment Requestmonthly-cap-reached.xml— the third $4 request on a $10 cap raises Limit Reached and asksend-stops-auto-pay.xml— after either side ends it, the next request asksrestart-never-pays-twice.xml— a kill right after the hand-off never leads to a second paymentManual Tests
regression:install the rc55 build, create a profile and a contact, then install this build → Profile and Contacts: intact, log reads "Resolved the stored Paykit state layout as 'RC55'"restart-never-pays-twice.xmland the payee half ofend-stops-auto-pay.xmlon two simulators: the source run drove them on Android only; iOS covered set, accept, auto-pay, ask above the limit and end by the payerAutomated Checks
PaykitAllowanceTests.swift— limits, terms, capacity, month anchoring and admission decisions, including that admission ignores the demo clockPaykitAllowanceExecutorTests.swift— reserve, hand-off, outcome recording, deferral, channel readiness and restart recovery of automatic paymentsPaykitPaymentProofServiceTests.swift— payment proofs carry the allowance idPaykitPaymentRequestServiceTests.swift— pre-allowance requests stay manualxcodebuild test -only-testing:BitkitTestson an iPhone simulator against the local Paykit build — 1,411 tests pass, 12 skipped; CI cannot resolve the Paykit build until Expose Allowance accounting to Swift and Kotlin pubky/paykit-rs#161 is published