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
use {
anchor_lang::prelude::*,
crate::state::*,
};
#[derive(Accounts)]
pub struct DeleteList<'info> {
#[account(
mut,
seeds = [
SEED_LIST,
list.owner.key().as_ref(),
list.namespace.as_ref()
],
bump = list.bump,
has_one = owner,
close = owner,
constraint = list.count == 0
)]
pub list: Account<'info, List>,
#[account(mut)]
pub owner: Signer<'info>,
}
pub fn handler(_ctx: Context<DeleteList>) -> ProgramResult {
return Ok(());
}