Skip to content

Commit

Permalink
chore: chache
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed May 23, 2024
1 parent 5e34d23 commit 54346da
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/L1YearnEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,14 @@ contract L1YearnEscrow is L1Escrow {
function _receiveTokens(
uint256 amount
) internal virtual override whenNotPaused {
originTokenAddress().safeTransferFrom(
msg.sender,
address(this),
amount
);
IERC20 originToken = originTokenAddress();
originToken.safeTransferFrom(msg.sender, address(this), amount);

VaultStorage storage $ = _getVaultStorage();
uint256 _minimumBuffer = $.minimumBuffer;
// Deposit to the vault if above buffer
if (_minimumBuffer != 0) {
uint256 underlyingBalance = originTokenAddress().balanceOf(
address(this)
);
uint256 underlyingBalance = originToken.balanceOf(address(this));

if (underlyingBalance <= _minimumBuffer) return;

Expand Down

0 comments on commit 54346da

Please sign in to comment.