fix(websocket): support generic quote kinds#1013
Open
callebtc wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1013 +/- ##
==========================================
+ Coverage 74.92% 74.98% +0.05%
==========================================
Files 111 111
Lines 12065 12081 +16
==========================================
+ Hits 9040 9059 +19
+ Misses 3025 3022 -3 ☔ View full report in Codecov by Sentry. |
b-l-u-e
reviewed
May 21, 2026
| for entry in websocket_supported: | ||
| if entry["method"] == method.name and entry["unit"] == unit.name: | ||
| if "bolt11_mint_quote" in entry["commands"]: | ||
| if "mint_quote" in entry["commands"]: |
Contributor
There was a problem hiding this comment.
If a new wallet talks to an old mint that still advertises bolt11_mint_quote, would we skip websockets and fall back to polling?
may be worth accepting both during migration
"mint_quote" in commands or "bolt11_mint_quote" in commands
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.
Summary
mint_quoteandmelt_quotekindsbolt11_*subscription kinds for backwards compatibility, with TODO comments to remove laterVerification
poetry run python -m py_compile cashu/core/json_rpc/base.py cashu/core/base.py cashu/mint/events/client.py cashu/mint/features.py cashu/core/mint_info.py cashu/wallet/mint_info.py cashu/wallet/wallet.py tests/mint/test_mint_websocket_protocol.py tests/wallet/test_wallet_subscription_unit.py tests/wallet/test_wallet_subscription.py tests/mint/test_mint_db.pygit diff --check -- cashu/core/json_rpc/base.py cashu/core/base.py cashu/mint/events/client.py cashu/mint/features.py cashu/core/mint_info.py cashu/wallet/mint_info.py cashu/wallet/wallet.py tests/mint/test_mint_websocket_protocol.py tests/wallet/test_wallet_subscription_unit.py tests/wallet/test_wallet_subscription.py tests/mint/test_mint_db.pypoetry run pytest tests/mint/test_mint_websocket_protocol.py tests/wallet/test_wallet_subscription_unit.py tests/mint/test_mint_db.py -q(blocked locally: Poetry env is using Python 3.14 and fails before test collection)poetry run pytest tests/wallet/test_wallet_subscription.py -q(blocked locally: Poetry env is using Python 3.14 and fails before test collection)