-
Notifications
You must be signed in to change notification settings - Fork 17
fix ws notification #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ws notification #189
Conversation
WalkthroughType and validation adjustments in onchain provider update ExplorerTransaction.vout.value from string to number and simplify status checks. Service worker now always broadcasts a utxoUpdate, even when newUtxos is empty, instead of returning early. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant SW as ServiceWorker
participant UTXO as UTXO Source
participant C1 as Client A
participant C2 as Client B
UTXO->>SW: newUtxos computed
alt newUtxos length > 0
SW->>C1: postMessage utxoUpdate(newUtxos)
SW->>C2: postMessage utxoUpdate(newUtxos)
else newUtxos length == 0
Note over SW: New behavior
SW->>C1: postMessage utxoUpdate([])
SW->>C2: postMessage utxoUpdate([])
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| typeof tx.status === "object" && | ||
| typeof tx.status.confirmed === "boolean" && | ||
| typeof tx.status.block_time === "number" | ||
| typeof tx.status.confirmed === "boolean" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure of this? Usually is string BigInt in json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from mempool websocket, we double checked it's a number not a string.
Summary by CodeRabbit