Skip to content

Commit 631710a

Browse files
committed
fix: mint tests
1 parent 8373791 commit 631710a

3 files changed

Lines changed: 3 additions & 11 deletions

File tree

program-tests/utils/src/assert_mint_action.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff 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
}

sdk-libs/compressed-token-sdk/src/instructions/mint_action/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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,

sdk-libs/token-client/src/instructions/mint_action.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)