File tree Expand file tree Collapse file tree
compressed-token-sdk/src/instructions/mint_action
token-client/src/instructions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,15 +87,12 @@ pub async fn assert_mint_action(
8787 MintActionType :: UpdateMetadataAuthority {
8888 extension_index,
8989 new_authority,
90- idempotent : _,
9190 } => {
9291 if let Some ( ref mut extensions) = expected_mint. extensions {
9392 if let Some ( ExtensionStruct :: TokenMetadata ( ref mut metadata) ) =
9493 extensions. get_mut ( * extension_index as usize )
9594 {
96- metadata. update_authority = new_authority
97- . map ( |a| a. to_bytes ( ) . into ( ) )
98- . unwrap_or ( [ 0u8 ; 32 ] . into ( ) ) ;
95+ metadata. update_authority = new_authority. into ( ) ;
9996 }
10097 }
10198 }
Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ pub enum MintActionType {
4343 } ,
4444 UpdateMetadataAuthority {
4545 extension_index : u8 ,
46- new_authority : Option < Pubkey > ,
47- idempotent : u8 ,
46+ new_authority : Pubkey ,
4847 } ,
4948 RemoveMetadataKey {
5049 extension_index : u8 ,
Original file line number Diff line number Diff line change @@ -223,14 +223,10 @@ pub async fn create_mint_action_instruction<R: Rpc + Indexer>(
223223 MintActionType :: UpdateMetadataAuthority {
224224 extension_index,
225225 new_authority,
226- idempotent : _,
227226 } => {
228- let authority_bytes = new_authority
229- . map ( |a| a. to_bytes ( ) . into ( ) )
230- . unwrap_or ( [ 0u8 ; 32 ] . into ( ) ) ;
231227 instruction_data. with_update_metadata_authority ( UpdateMetadataAuthorityAction {
232228 extension_index,
233- new_authority : authority_bytes ,
229+ new_authority : new_authority . to_bytes ( ) . into ( ) ,
234230 } )
235231 }
236232 MintActionType :: RemoveMetadataKey {
You can’t perform that action at this time.
0 commit comments