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

Fix: transfer debt event with updated repaid amount #1837

Merged
merged 2 commits into from
May 17, 2024

Conversation

lemunozm
Copy link
Contributor

Description

TransferEvent was set with the initial repaid_amount. That amount changes once it is processed and could not be the amount that it's really applied.

@lemunozm lemunozm added I2-bug The code fails to follow expected behaviour. P7-asap Issue should be addressed in the next days. labels May 16, 2024
@lemunozm lemunozm self-assigned this May 16, 2024
Copy link
Contributor

@hieronx hieronx left a comment

Choose a reason for hiding this comment

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

Fix looks good! Would be nice to have test :)

wischli
wischli previously approved these changes May 16, 2024
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

Could we add a unit test to assert event payloads? IMO, every hotfix should either include a test fix or add a new test.

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.88%. Comparing base (a4b4df6) to head (45b955c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1837      +/-   ##
==========================================
- Coverage   46.91%   46.88%   -0.04%     
==========================================
  Files         165      165              
  Lines       12950    12950              
==========================================
- Hits         6076     6071       -5     
- Misses       6874     6879       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mustermeiszer
mustermeiszer previously approved these changes May 16, 2024
Copy link
Collaborator

@mustermeiszer mustermeiszer left a comment

Choose a reason for hiding this comment

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

Great catch!

@lemunozm
Copy link
Contributor Author

Sure! I always forget to test events properly, and I should.

@lemunozm lemunozm dismissed stale reviews from mustermeiszer and wischli via 45b955c May 16, 2024 14:06
@lemunozm lemunozm enabled auto-merge (squash) May 16, 2024 15:18
@lemunozm lemunozm merged commit ba41880 into main May 17, 2024
12 checks passed
@lemunozm lemunozm deleted the fix/transfer-debt-event branch May 17, 2024 11:18
gpmayorga pushed a commit that referenced this pull request May 17, 2024
* fix transfer debt event with updated repaid amount

* add tests for checking repay events
@wischli wischli added this to the Centrifuge 1029 milestone Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The code fails to follow expected behaviour. P7-asap Issue should be addressed in the next days.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants