[protocol] Issue concerning wrong param ordering in emitted `RepayBorrow` event
scorpion9979 opened this issue · 4 comments
From IBalanceSheetV1.sol#L51, we notice that RepayBorrow
is defined to have payer
is the first param of the event and borrower
as the second. But if we go to BalanceSheetV1.sol#L628, we see that the emitted event has the params in the opposite order.
I discovered this while investigating a bug in the subgraph that was causing the event-based debt amount calculation to return negative values.
Thanks for opening this issue, @scorpion9979. Looks like the links are stale now - that's because you shared the normal links that contain the main
branch in the URL. To prevent this in the future, you could instead click CMD+Y (or "CTRL+Y" on Linux/ Windows) to obtain a permanent URL to the source code.
@PaulRBerg The links are now fixed.
I was wondering why this hasn't been caught by our tests .. and I found that it was because the repayBorrowBehalf tests didn't check the RepayBorrow
event.
Just added a passing test in f3cb543.