-
Notifications
You must be signed in to change notification settings - Fork 313
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 the interpreted value of the getEvents
endpoint
#876
Conversation
@@ -6,239 +6,251 @@ const publicKey = "GCBVOLOM32I7OD5TWZQCIXCXML3TK56MDY7ZMTAILIBQHHKPCVU42XYW"; | |||
const addr = Address.fromString(publicKey); |
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.
idk why this keeps changing but this is a yarn fmt
artifact
Size Change: -80 B (0%) Total Size: 12.1 MB
|
function filterEvents(events, filter) { | ||
const parts = filter.split("/"); | ||
return events.filter( | ||
(e, i) => | ||
e.topic.length == filter.length && | ||
e.topic.every((s, j) => s === filter[j] || s === "*"), | ||
e.topic.length == parts.length && | ||
e.topic.every((s, j) => s === parts[j] || parts[j] === "*"), |
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 is the 🤦 that led to tests not actually running correctly
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.
lgtm!
This was not caught by tests because of a bug in the "pseudo-filtering" which was essentially comparing empty arrays to each other in the entire test suite 🤦