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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DealSponsored event handler #23

Merged
merged 54 commits into from
Dec 13, 2024
Merged

Conversation

gfournieriExec
Copy link
Contributor

No description provided.

@gfournieriExec gfournieriExec requested a review from a team December 2, 2024 15:58
@gfournieriExec gfournieriExec self-assigned this Dec 2, 2024
@gfournieriExec gfournieriExec changed the base branch from develop to feature/formatting-sponsor December 3, 2024 08:45
Copy link

@Le-Caignec Le-Caignec left a comment

Choose a reason for hiding this comment

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

Just one commentary

@Le-Caignec Le-Caignec self-requested a review December 11, 2024 18:53
Comment on lines 427 to 428
let dealSponsoredEvent = new DealSponsored(createEventID(event));
dealSponsoredEvent.transaction = logTransaction(event).id;
Copy link

@Le-Caignec Le-Caignec Dec 11, 2024

Choose a reason for hiding this comment

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

you should load an entity before creating it. It prevent bugs when the graphNode make some re-indexing tricks:

Suggested change
let dealSponsoredEvent = new DealSponsored(createEventID(event));
dealSponsoredEvent.transaction = logTransaction(event).id;
let dealSponsored = DealSponsored.load(createEventID(event))
if (!dealSponsored){
dealSponsored = new DealSponsored(createEventID(event));
}
dealSponsored.transaction = logTransaction(event).id;

Copy link
Member

@jeremyjams jeremyjams left a comment

Choose a reason for hiding this comment

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

Thanks :)

@gfournieriExec gfournieriExec merged commit 619bfa6 into develop Dec 13, 2024
2 checks passed
@gfournieriExec gfournieriExec deleted the feature/poco-sponsoring branch December 13, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants