Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing some IX perms #150

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions configs/program-scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ for p in ${PROGRAMS[@]}; do
CARGO_TERM_COLOR=always cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} --features padded -- --nocapture 2>&1 | ${SOLFMT} && \
CARGO_TERM_COLOR=always cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} --features padded resize -- --nocapture 2>&1 | ${SOLFMT}
else
cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} -- --nocapture && \
cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} --features padded -- --nocapture && \
cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} --features padded resize -- --nocapture
cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} -- --nocapture --test-threads=1 && \
cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} --features padded -- --nocapture --test-threads=1 && \
cargo test-sbf --sbf-out-dir ${WORKING_DIR}/${OUTPUT} ${ARGS} --features padded resize -- --nocapture --test-threads=1
fi
done
6 changes: 2 additions & 4 deletions programs/token-metadata/program/src/processor/resize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ pub fn process_resize<'a>(
}
// No need to check edition ownership since it is empty for fungibles.

// For fungibles, the update authority is the one who can resize the asset,
// so we need to check that the authority is the update authority of the metadata account.
// Or if the claim period is over, the authority is the resize authority.
if metadata.update_authority != *authority.key && authority.key != &RESIZE_AUTHORITY {
// For fungibles only the resize authority can resize the asset.
if authority.key != &RESIZE_AUTHORITY {
return Err(MetadataError::UpdateAuthorityIncorrect.into());
}
}
Expand Down
Loading
Loading