Skip to content

Commit

Permalink
chore: fix slither warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zugdev committed Sep 11, 2024
1 parent 29c2ea5 commit 42f592e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/contracts/lib/aave-v3-core
Submodule aave-v3-core added at b74526
1 change: 1 addition & 0 deletions packages/contracts/lib/aave-v3-periphery
Submodule aave-v3-periphery added at 72fdcc
10 changes: 5 additions & 5 deletions packages/contracts/src/dollar/core/UbiquityAMOMinter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ contract UbiquityAMOMinter is Ownable {
) external validAMO(msg.sender) {
int256 collat_amt_i256 = int256(collat_amount);

// Receive first
// First, update the balances
collat_borrowed_balances[msg.sender] -= collat_amt_i256;
collat_borrowed_sum -= collat_amt_i256;

// Then perform transfer from
collateral_token.safeTransferFrom(
msg.sender,
address(pool),
collat_amount
);

// Then update the balances
collat_borrowed_balances[msg.sender] -= collat_amt_i256;
collat_borrowed_sum -= collat_amt_i256;

emit CollateralReceivedFromAMO(msg.sender, collat_amount);
}

Expand Down

0 comments on commit 42f592e

Please sign in to comment.