Skip to content

Commit

Permalink
Merge pull request #183 from unioncredit/feature/uni-2162-decimal-err…
Browse files Browse the repository at this point in the history
…or-in-your-activity

chg: update event
  • Loading branch information
maxweng authored Dec 9, 2024
2 parents e3b6d9c + e3db37e commit 7a0a034
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions contracts/market/UToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,12 @@ contract UToken is IUToken, Controller, ERC20PermitUpgradeable, ReentrancyGuardU
true
);

emit LogBorrow(msg.sender, to, actualAmount, fee);
emit LogBorrow(
msg.sender,
to,
decimalReducing(actualAmount, underlyingDecimal),
decimalReducing(fee, underlyingDecimal)
);
}

/**
Expand Down Expand Up @@ -832,7 +837,7 @@ contract UToken is IUToken, Controller, ERC20PermitUpgradeable, ReentrancyGuardU
// send all to asset manager
_depositToAssetManager(balanceAfter - balanceBefore);

emit LogMint(msg.sender, mintAmount, mintTokens);
emit LogMint(msg.sender, actualObtained, mintTokens);
}

/**
Expand Down Expand Up @@ -871,7 +876,7 @@ contract UToken is IUToken, Controller, ERC20PermitUpgradeable, ReentrancyGuardU
_burn(msg.sender, realUtokenAmount);

_totalRedeemable -= actualAmount;
emit LogRedeem(msg.sender, amountIn, amountOut, realUtokenAmount, actualAmount);
emit LogRedeem(msg.sender, amountIn, amountOut, realUtokenAmount, underlyingAmount - remaining);
}

/* -------------------------------------------------------------------
Expand Down Expand Up @@ -915,7 +920,7 @@ contract UToken is IUToken, Controller, ERC20PermitUpgradeable, ReentrancyGuardU
uint256 actualAmount = decimalScaling(reduceAmount - remaining, underlyingDecimal);
_totalReserves -= actualAmount;

emit LogReservesReduced(receiver, actualAmount, _totalReserves);
emit LogReservesReduced(receiver, reduceAmount - remaining, _totalReserves);
}

/* -------------------------------------------------------------------
Expand Down

0 comments on commit 7a0a034

Please sign in to comment.