Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
makarychev committed Jun 10, 2024
1 parent 775b6a0 commit 48e61d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions programs/donaproto/src/instructions/donate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ pub fn donate(ctx: Context<Donate>, amount: u64) -> Result<()> {
return Err(DonationError::DonationAmountZero.into());
}

// use donate_v2 if donation mint is different
// bc fair calculation of rewards is linkend with donation protocol mint
if ctx.accounts.donation_mint.key() != ctx.accounts.donation_protocol.donation_mint {
return Err(DonationError::InvalidDonationMint.into());
}
Expand Down
2 changes: 1 addition & 1 deletion programs/donaproto/src/instructions/withdraw_funds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub struct WithdrawFunds<'info> {
}

// use withdraw_funds_v2.rs if donation mint is different
// bc fair calculation of rewards linkend with donation protocol mint
// bc fair calculation of rewards is linkend with donation protocol mint
if ctx.accounts.donation_mint.key() != ctx.accounts.donation_protocol.donation_mint {
return Err(DonationError::InvalidDonationMint.into());
}
Expand Down

0 comments on commit 48e61d2

Please sign in to comment.