Skip to content

Commit

Permalink
remove close account when withdraw
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsource147 committed May 1, 2024
1 parent 30dfbb0 commit b605978
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions programs/locked-voter/src/instructions/withdraw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,6 @@ impl<'info> Withdraw<'info> {
)?;
}

// close escrow_tokens
token::close_account(
CpiContext::new(
self.token_program.to_account_info(),
token::CloseAccount {
account: self.escrow_tokens.to_account_info(),
destination: self.payer.to_account_info(),
authority: self.escrow.to_account_info(),
},
)
.with_signer(seeds),
)?;

// update the locker
let locker = &mut self.locker;
locker.locked_supply = unwrap_int!(locker.locked_supply.checked_sub(self.escrow.amount));
Expand Down

0 comments on commit b605978

Please sign in to comment.