Skip to content

Commit

Permalink
Revert "Fixing missing lifecycle impl"
Browse files Browse the repository at this point in the history
This reverts commit 8a81d36.
  • Loading branch information
blockiosaurus committed Feb 21, 2025
1 parent 8a81d36 commit 19443d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
24 changes: 0 additions & 24 deletions programs/mpl-core/src/plugins/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,6 @@ impl PluginType {
}
}

/// Check permissions for the execute lifecycle event.
pub fn check_execute(plugin_type: &PluginType) -> CheckResult {
#[allow(clippy::match_single_binding)]
match plugin_type {
_ => CheckResult::None,
}
}

/// Check permissions for the add external plugin adapter lifecycle event.
pub fn check_add_external_plugin_adapter(plugin_type: &PluginType) -> CheckResult {
#[allow(clippy::match_single_binding)]
Expand Down Expand Up @@ -398,14 +390,6 @@ impl Plugin {
plugin.inner().validate_decompress(ctx)
}

/// Validate the execute lifecycle event.
pub(crate) fn validate_execute(
plugin: &Plugin,
ctx: &PluginValidationContext,
) -> Result<ValidationResult, ProgramError> {
plugin.inner().validate_execute(ctx)
}

/// Validate the add external plugin adapter lifecycle event.
pub(crate) fn validate_add_external_plugin_adapter(
plugin: &Plugin,
Expand Down Expand Up @@ -642,14 +626,6 @@ pub(crate) trait PluginValidation {
abstain!()
}

/// Validate the execute lifecycle action.
fn validate_execute(
&self,
_ctx: &PluginValidationContext,
) -> Result<ValidationResult, ProgramError> {
abstain!()
}

/// Validate the update_plugin lifecycle action.
fn validate_update_external_plugin_adapter(
&self,
Expand Down
9 changes: 4 additions & 5 deletions programs/mpl-core/src/processor/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,10 @@ fn update<'a>(
if plugin_set.contains(&PluginType::UpdateDelegate) {
// Fetch the update delegate on the new collection.
// Do not ignore the return plugin as we need to check the additional delegates.
let (plugin_authority, fetched_plugin, _) =
fetch_plugin::<CollectionV1, UpdateDelegate>(
new_collection_account,
PluginType::UpdateDelegate,
)?;
let (plugin_authority, fetched_plugin, _) = fetch_plugin::<CollectionV1, UpdateDelegate>(
new_collection_account,
PluginType::UpdateDelegate,
)?;

if (assert_collection_authority(
&new_collection,
Expand Down

0 comments on commit 19443d7

Please sign in to comment.