1
1
use anchor_lang:: prelude:: * ;
2
+ use anchor_spl:: associated_token:: AssociatedToken ;
2
3
use anchor_spl:: token_interface:: { Mint , TokenAccount , TokenInterface } ;
3
4
4
5
use crate :: context:: { VESTING_BALANCE_SEED , VESTING_CONFIG_SEED , VEST_SEED } ;
@@ -11,8 +12,9 @@ pub struct CancelVesting<'info> {
11
12
admin : Signer < ' info > ,
12
13
mint : InterfaceAccount < ' info , Mint > ,
13
14
#[ account(
14
- token:: mint = mint,
15
- token:: token_program = token_program
15
+ associated_token:: mint = mint,
16
+ associated_token:: authority = vester_ta. owner,
17
+ associated_token:: token_program = token_program
16
18
) ]
17
19
vester_ta : InterfaceAccount < ' info , TokenAccount > ,
18
20
#[ account(
@@ -38,6 +40,8 @@ pub struct CancelVesting<'info> {
38
40
bump = vesting_balance. bump
39
41
) ]
40
42
vesting_balance : Account < ' info , VestingBalance > ,
43
+
44
+ associated_token_program : Program < ' info , AssociatedToken > ,
41
45
token_program : Interface < ' info , TokenInterface > ,
42
46
system_program : Program < ' info , System > ,
43
47
}
0 commit comments