From df164854cbd5f76572a16fe5bd10961bdee928bf Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 16 Oct 2023 13:34:54 +0200 Subject: [PATCH] update initialize_member instruction --- token-group/interface/src/instruction.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/token-group/interface/src/instruction.rs b/token-group/interface/src/instruction.rs index b1c41a91056..74d862102f4 100644 --- a/token-group/interface/src/instruction.rs +++ b/token-group/interface/src/instruction.rs @@ -89,8 +89,9 @@ pub enum TokenGroupInterfaceInstruction { /// Accounts expected by this instruction: /// /// 0. `[w]` Member - /// 1. `[w]` Group - /// 2. `[s]` Group update authority + /// 1. `[s]` Member update authority + /// 2. `[w]` Group + /// 3. `[s]` Group update authority InitializeMember(InitializeMember), } impl TokenGroupInterfaceInstruction { @@ -225,13 +226,15 @@ pub fn update_group_authority( #[allow(clippy::too_many_arguments)] pub fn initialize_member( program_id: &Pubkey, + member: &Pubkey, + member_update_authority: &Pubkey, group: &Pubkey, group_update_authority: &Pubkey, - member: &Pubkey, ) -> Instruction { let data = TokenGroupInterfaceInstruction::InitializeMember(InitializeMember {}).pack(); let accounts = vec![ AccountMeta::new(*member, false), + AccountMeta::new_readonly(*member_update_authority, true), AccountMeta::new(*group, false), AccountMeta::new_readonly(*group_update_authority, true), ];