Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zjb0807 committed Nov 19, 2023
1 parent 77bdc1a commit 3bb0d9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/StableAsset.sol
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ contract StableAsset is Initializable, ReentrancyGuardUpgradeable {
);
}

totalSupply = D - redeemAmount;
totalSupply = D - _amount;
// After reducing the redeem fee, the remaining pool tokens are burned!
poolToken.burnSharesFrom(msg.sender, _amount);
feeAmount = collectFeeOrYield(true);
Expand Down Expand Up @@ -896,7 +896,7 @@ contract StableAsset is Initializable, ReentrancyGuardUpgradeable {
}
amounts[_i] = transferAmount;
IERC20Upgradeable(tokens[_i]).safeTransfer(msg.sender, transferAmount);
totalSupply = D - redeemAmount;
totalSupply = D - _amount;
poolToken.burnSharesFrom(msg.sender, _amount);
feeAmount = collectFeeOrYield(true);
emit Redeemed(msg.sender, _amount, amounts, feeAmount);
Expand Down Expand Up @@ -992,7 +992,7 @@ contract StableAsset is Initializable, ReentrancyGuardUpgradeable {

// Updates token balances in storage.
balances = _balances;
totalSupply = oldD - (redeemAmount - feeAmount);
totalSupply = oldD - redeemAmount;
poolToken.burnSharesFrom(msg.sender, redeemAmount);
uint256[] memory amounts = _amounts;
for (i = 0; i < _balances.length; i++) {
Expand Down

0 comments on commit 3bb0d9d

Please sign in to comment.