Skip to content

Commit

Permalink
Make code more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
ljiatu committed Dec 31, 2024
1 parent 8964eb1 commit caf554e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/liquidity/TrancheVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ contract TrancheVault is

// Mint LP tokens to existing lenders.
uint256 oldBalance = oldTrancheVault.balanceOf(lender);
if (balanceOf(lender) == 0) {
_mint(lender, oldBalance);
if (oldBalance != balanceOf(lender)) {
_mint(lender, oldBalance - balanceOf(lender));
}
}
}
Expand Down

0 comments on commit caf554e

Please sign in to comment.