FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

402 middleware should accept chain-specific balances · Issue #203 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

Repository navigation

402 middleware should accept chain-specific balances #203

Closed

Description

Bug

Same issue as #201 but for the 402 paywall middleware. When --pay-chains is enabled, the 402 handler only checks generic sat balance, so users with only chain-specific deposits (e.g. tbtc4) get blocked even though they have funds.

Steps to reproduce

  1. Start JSS with --pay --pay-chains tbtc3,tbtc4
  2. Deposit a tbtc4 TXO → tbtc4: 2083219, sat: 0
  3. GET /pay/secret.json with NIP-98 auth → 402 Payment Required (balance: 0)

Expected

The 402 middleware should fall back to chain-specific balances if generic sat is insufficient. Either:

  • Accept a X-Pay-Currency: tbtc4 header to specify which balance to use
  • Automatically try chain balances when sat balance is 0
  • Return available balances in the 402 response so the client can retry with a currency header

Related

Activity

  1. added a commit that references this issue on Mar 12, 2026
    84b53a2
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL