|
@@ -33,12 +33,12 @@ pub fn process_close_account(accounts: &[AccountInfo]) -> ProgramResult {
|
|
|
|
|
|
let destination_starting_lamports = destination_account_info.lamports();
|
|
|
unsafe {
|
|
|
- // Moves the lamports to the destination account and closes the source account.
|
|
|
+ // Moves the lamports to the destination account.
|
|
|
*destination_account_info.borrow_mut_lamports_unchecked() = destination_starting_lamports
|
|
|
.checked_add(source_account_info.lamports())
|
|
|
.ok_or(TokenError::Overflow)?;
|
|
|
-
|
|
|
- source_account_info.close();
|
|
|
+ // Closes the source account.
|
|
|
+ source_account_info.close_unchecked();
|
|
|
}
|
|
|
|
|
|
Ok(())
|