Skip to content

feat: pay allowance requests on-chain once fees count against the limits #1592

Description

@ovitrif

Refs:

What happened?

Automatic on-chain allowance payments spend a mining fee that no allowance limit counts. The SDK's allowance ledger records the request amount only, since it requires the paid amount to equal the request, and the per-payment and monthly checks in PaykitAllowanceExecutor use the same amount. This PR adds a stopgap: an automatic on-chain payment whose fee exceeds the amount stays manual. A fee up to the amount still falls outside the limits, so a contact that publishes only on-chain endpoints can make the wallet spend up to twice what the allowance shows as paid.

Expected behavior

The total an allowance can make the wallet spend, fees included, stays within what the user approved: either fees count against the per-payment and monthly limits, or automatic payments use only Lightning.

Steps to Reproduce

  1. Grant a contact $5 a payment and $10 a month.
  2. The contact publishes only an on-chain endpoint and sends many small requests.
  3. Each request is paid on-chain with a Medium-rate fee; the detail sheet shows only the amounts.

Bitkit Version

Unreleased: allowances branch of #1340.

Reproducibility

From the code path; not yet run on a device.

Activity

  1. added this to the 3.2.0 milestone on Oct 19, 2026
  2. added theissue type on Oct 19, 2026
  3. changed the title [-]bug: automatic on-chain allowance fees are not counted against the allowance limits[/-] [+]feat: pay allowance requests on-chain once fees count against the limits[/+] on Oct 19, 2026
  4. ovitrif commented on Oct 19, 2026

    @ovitrif
    CollaboratorAuthor

    Rescoped: #1340 now pays allowance requests automatically over Lightning only (6e36ce4), so on-chain fees no longer escape the limits; an on-chain request stays manual. This issue now tracks bringing on-chain auto-pay back once its fees count against the per-payment and monthly limits.

  5. changed the issue type fromtoon Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions