Skip to content

Commit

Permalink
Update comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
piobab committed Jul 25, 2024
1 parent 882bd77 commit 215bf25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/credit-manager/src/deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ pub fn update_or_reset_denom_deposits(
return Ok(());
}

// Check if denom is already in the list
// Check if the denomination is already in the list.
// This ensures that a Deposit action (which does not have an associated amount)
// is not overwritten by a subsequent Swap or ProvideLiquidity action.
// By confirming the existence of the denomination in the list, we maintain
// the integrity of the original Deposit action.
if denom_deposits.contains_key(denom) {
return Ok(());
}
Expand Down

0 comments on commit 215bf25

Please sign in to comment.