Closed scorpion9979 closed 2 years ago
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 https://github.com/hifi-finance/hifi/commit/f3cb5431edd53945d15557d26d3349858515156e.
From IBalanceSheetV1.sol#L51, we notice that
RepayBorrow
is defined to havepayer
is the first param of the event andborrower
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.