You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: allowance added notice is lost when the app leaves during an automatic accept #1672
When the allowee's wallet accepts an allowance offer automatically and the app goes to the background at that moment, the allowance becomes Active but "Allowance Added" is never shown. Leaving the app stops the request polling job; the SDK still commits the accept, then the cancellation skips the step that returns the offer for announcement. Later refreshes see the allowance as already accepted, so the notice is lost for good. Process death right after the accept ends the same way.
Expected behavior
Every offer accepted automatically is announced once, on the refresh after the accept if the one that accepted it was cancelled.
Steps to Reproduce
Payer sets an allowance for the payee (journeys/allowances/set-and-accept.xml).
On the payee, send Bitkit to the background right as the offer is being accepted.
Reopen Bitkit: the allowance is Active, and no "Allowance Added" notification or toast ever appears.
Logs / Screenshots / Recordings
PaykitSdkService.completeSdkCall runs acceptAllowance under NonCancellable, then calls ensureActive(), so the accept is committed and a CancellationException follows. acceptOffersFromAllowers never returns the offer, and announceAcceptedAllowanceOffers is skipped.
Small follow-ups from the same review:
journeys/allowances/monthly-cap-reached.xml step 2 still says "have the payee accept it"; the payee's wallet accepts by itself. Same wording in end-stops-auto-pay.xml.
journeys/allowances/pin-gates-allowance-changes.xml: the "On the payee instance" step ends by checking the payer's row; split it into a payee step and a payer step.
PaykitAllowanceRepoTest.kt: offer accept never answers an ask that joined the entry after the check cannot fail, since allowances of different contacts never share an entry; rename it to what it checks and drop the matching comment in PaykitAllowanceRepo.kt.
Activity