Skip to content

Commit

Permalink
Finishing PR with published mpl-utils.
Browse files Browse the repository at this point in the history
  • Loading branch information
blockiosaurus committed Apr 9, 2024
1 parent c965f19 commit ab5eea5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
21 changes: 6 additions & 15 deletions programs/token-metadata/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions programs/token-metadata/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ mpl-token-auth-rules = { version = "=1.4.3-beta.1", features = [
"no-entrypoint",
] }
mpl-token-metadata-context-derive = { version = "0.3.0", path = "../macro" }
mpl-utils = { path = "/home/kelliott/work/mpl/metaplex-program-library/core/rust/utils", features = [
"spl-token",
] }
mpl-utils = { version = "0.3.4", features = ["spl-token"] }
num-derive = "0.3"
num-traits = "0.2"
serde = { version = "1.0.149", optional = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ fn transfer_v1(program_id: &Pubkey, ctx: Context<Transfer>, args: TransferArgs)
authority_signer_seeds: None,
token_program: ctx.accounts.spl_token_program_info.clone(),
decimals: mint.decimals,
edition_bump: metadata.edition_nonce,
};

let token_standard = metadata.token_standard;
Expand Down Expand Up @@ -399,7 +398,11 @@ fn transfer_v1(program_id: &Pubkey, ctx: Context<Transfer>, args: TransferArgs)
};

auth_rules_validate(auth_rules_validate_params)?;
frozen_transfer(token_transfer_params, ctx.accounts.edition_info)?;
frozen_transfer(
token_transfer_params,
metadata.edition_nonce,
ctx.accounts.edition_info,
)?;

let master_edition_info = ctx
.accounts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ pub fn auth_rules_validate(params: AuthRulesValidateParams) -> ProgramResult {

pub fn frozen_transfer<'a>(
params: TokenTransferCheckedParams<'a, '_>,
edition_bump: Option<u8>,
edition_opt_info: Option<&'a AccountInfo<'a>>,
) -> ProgramResult {
let edition_bump = params.edition_bump;
if edition_opt_info.is_none() {
return Err(MetadataError::MissingEditionAccount.into());
}
Expand Down

0 comments on commit ab5eea5

Please sign in to comment.