Update lib.rs (#6)

`destination` should be declared as `mut` in order to receiver lamports from `account`.
This commit is contained in:
johnzhu0907 2022-07-03 22:32:35 +08:00 committed by GitHub
parent 609e5ade22
commit d0698880fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ pub mod closing_accounts_recommended {
pub struct Close<'info> {
#[account(mut, close = destination)]
account: Account<'info, Data>,
#[account(mut)]
destination: AccountInfo<'info>,
}