1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use {crate::state::*, anchor_lang::prelude::*};
#[derive(Accounts)]
pub struct ThreadDelete<'info> {
#[account()]
pub authority: Signer<'info>,
#[account(mut)]
pub close_to: SystemAccount<'info>,
#[account(
mut,
seeds = [
SEED_THREAD,
thread.authority.as_ref(),
thread.id.as_bytes(),
],
bump,
has_one = authority,
close = close_to
)]
pub thread: Account<'info, Thread>,
}
pub fn handler(_ctx: Context<ThreadDelete>) -> Result<()> {
Ok(())
}