Skip to content

Commit

Permalink
#45 #47 Old tests are now using lendingPoolTestProfiles.js, `assertCo…
Browse files Browse the repository at this point in the history
…lLimitNotExceeded` doesn't do anything when collateral balance is not changing.
  • Loading branch information
anilhelvaci committed Dec 21, 2022
1 parent 82b392a commit 0b25bb2
Show file tree
Hide file tree
Showing 2 changed files with 613 additions and 752 deletions.
2 changes: 2 additions & 0 deletions contract/src/lendingPool/assertionHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ const assertColLimitNotExceeded = (balanceTracer, getColLimit, proposal, colUnde

const collateralAmount = collateralAmountGiven ? collateralAmountGiven : collateralAmountWanted;

if (!collateralAmount) return; // Collateral balance is not changing

const currentBalance = balanceTracer.getBalance(collateralAmount.brand);
const proposedBalance = AmountMath.add(currentBalance, collateralAmount);
const colLimit = getColLimit(colUnderlyingBrand);
Expand Down
Loading

0 comments on commit 0b25bb2

Please sign in to comment.