fix(nut17): decode notifications with subscription kind - #2198
Merged
Conversation
Collaborator
Author
|
@cdk-bot review |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2198 +/- ##
==========================================
+ Coverage 73.20% 73.28% +0.07%
==========================================
Files 359 359
Lines 79996 79976 -20
==========================================
+ Hits 58558 58607 +49
+ Misses 21438 21369 -69 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
crodas
previously approved these changes
Jul 4, 2026
Collaborator
Author
|
thesimplekid
force-pushed
the
nut17_notification
branch
from
July 6, 2026 13:05
71d6de7 to
b78c522
Compare
Collaborator
Author
|
@cdk-bot review |
thesimplekid
force-pushed
the
nut17_notification
branch
3 times, most recently
from
July 7, 2026 21:09
b172e6e to
acdb8aa
Compare
Collaborator
Author
thesimplekid
force-pushed
the
nut17_notification
branch
2 times, most recently
from
July 8, 2026 10:10
81e0708 to
8d66175
Compare
Notification payloads are not self-describing. Keep websocket notification payloads as raw JSON until callers can decode them with subscription-kind context. Expose raw websocket message aliases and make context-free NotificationPayload and WsMessageOrResponse deserialization unavailable to avoid silently selecting the wrong quote payload variant. BREAKING CHANGE: NotificationPayload and WsMessageOrResponse no longer deserialize notification payloads without subscription-kind context.
thesimplekid
force-pushed
the
nut17_notification
branch
from
July 9, 2026 08:10
8d66175 to
dd74c9a
Compare
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.
NUT-17 notification payloads are ambiguous without the subscription kind, since quote response shapes overlap and tolerate unknown fields. Add a kind-aware payload decoder and use it in the wallet subscription client while keeping websocket payloads as raw JSON until the subId can be mapped back to its kind.
This prevents onchain and custom quote notifications from being decoded as the wrong payload variant.
Description
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just quick-checkbefore committingcrates/cdk-ffi)