Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the interpreted value of the getEvents endpoint #876

Merged
merged 4 commits into from Nov 3, 2023
Merged

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Nov 2, 2023

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 馃う

@Shaptic Shaptic requested a review from sreuland November 2, 2023 22:31
@Shaptic Shaptic self-assigned this Nov 2, 2023
@Shaptic Shaptic added the bug label Nov 2, 2023
@Shaptic Shaptic added this to the Soroban Stable P20 Release milestone Nov 2, 2023
@Shaptic Shaptic marked this pull request as ready for review November 2, 2023 22:51
@@ -6,239 +6,251 @@ const publicKey = "GCBVOLOM32I7OD5TWZQCIXCXML3TK56MDY7ZMTAILIBQHHKPCVU42XYW";
const addr = Address.fromString(publicKey);
Copy link
Contributor Author

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

Copy link

github-actions bot commented Nov 2, 2023

Size Change: -80 B (0%)

Total Size: 12.1 MB

Filename Size Change
dist/stellar-sdk.js 6.96 MB -38 B (0%)
dist/stellar-sdk.min.js 5.1 MB -42 B (0%)

compressed-size-action

Comment on lines 199 to +204
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] === "*"),
Copy link
Contributor Author

@Shaptic Shaptic Nov 2, 2023

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

Copy link

@sreuland sreuland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@Shaptic Shaptic merged commit 489bead into master Nov 3, 2023
7 checks passed
@Shaptic Shaptic deleted the fixup-getEvents branch November 3, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants