Title: 402 middleware should accept chain-specific balances · Issue #203 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: 402 middleware should accept chain-specific balances · Issue #203 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: 402 middleware should accept chain-specific balances · Issue #203 · JavaScriptSolidServer/JavaScriptSolidServer
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. St...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/203
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"402 middleware should accept chain-specific balances","articleBody":"## Bug\n\nSame 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.\n\n## Steps to reproduce\n\n1. Start JSS with `--pay --pay-chains tbtc3,tbtc4`\n2. Deposit a tbtc4 TXO → `tbtc4: 2083219, sat: 0`\n3. `GET /pay/secret.json` with NIP-98 auth → 402 Payment Required (balance: 0)\n\n## Expected\n\nThe 402 middleware should fall back to chain-specific balances if generic `sat` is insufficient. Either:\n\n- Accept a `X-Pay-Currency: tbtc4` header to specify which balance to use\n- Automatically try chain balances when sat balance is 0\n- Return available balances in the 402 response so the client can retry with a currency header\n\n## Related\n\n- #201 — same fix applied to `.buy` endpoint\n- #202 — PR that fixed `.buy`","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-03-12T07:32:56Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/203"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ebf46c49-96c2-9622-a464-495a0df7e456 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8330:12EFD7:E7F9C7:12540DF:6B037D43 |
| html-safe-nonce | 064815adac8e01b7a04c1ea0223980311142acd2d7a1a60e365b37d7f53ead9e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzMwOjEyRUZENzpFN0Y5Qzc6MTI1NDBERjo2QjAzN0Q0MyIsInZpc2l0b3JfaWQiOiI0NTQzOTMyODEyMzQ0MTMwODgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c9fb1dd3667558e2f470edb05b13cd94ba384a24a5b63f8e2a7c7f901783a894 |
| hovercard-subject-tag | issue:4062793116 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/203/issue_layout |
| twitter:image | https://opengraph.githubassets.com/25818075e91e59c380c5652376a4518d0c5224968e6f5e39f9ae38911545371f/JavaScriptSolidServer/JavaScriptSolidServer/issues/203 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/25818075e91e59c380c5652376a4518d0c5224968e6f5e39f9ae38911545371f/JavaScriptSolidServer/JavaScriptSolidServer/issues/203 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width