Skip to content

Commit

Permalink
add error code
Browse files Browse the repository at this point in the history
  • Loading branch information
solonk8 committed Apr 30, 2024
1 parent 1e10b37 commit ed1fe91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion programs/mmm/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,7 @@ pub enum MMMErrorCode {
#[msg("Invalid token member extensions")]
InvalidTokenMemberExtension, // 0x178f
#[msg("Invalid asset collection")]
InvalidAssetCollection,
InvalidAssetCollection, // 0x1790
#[msg("Invalid token extension")]
InvalidTokenExtension, // 0x1791
}
2 changes: 1 addition & 1 deletion programs/mmm/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ pub fn assert_valid_extension(mint_deserialized: &StateWithExtensions<Token22Min
let extension_types = mint_deserialized.get_extension_types()?;
for ext in extension_types.iter() {
if !T22_EXTENSION_ALLOW_LIST.contains(ext) {
return Err(MMMErrorCode::InvalidTokenMint.into());
return Err(MMMErrorCode::InvalidTokenExtension.into());
}
}

Expand Down

0 comments on commit ed1fe91

Please sign in to comment.