in project-10-lending/programs/lending/src/instructions/withdraw.rs, I find that the use‘s deposited amount was deducted using value of shares_to_remove variable, just like the following:
if ctx.accounts.mint.to_account_info().key() == user.usdc_address {
user.deposited_usdc -= shares_to_remove as u64;
} else {
user.deposited_sol -= shares_to_remove as u64;
}
I think it should use amount variable instead of shares_to_remove , is it right?
in
project-10-lending/programs/lending/src/instructions/withdraw.rs, I find that the use‘s deposited amount was deducted using value ofshares_to_removevariable, just like the following:I think it should use
amountvariable instead ofshares_to_remove, is it right?