From 19443d76cbddbd74294d682d0303acf9e0c3cef6 Mon Sep 17 00:00:00 2001 From: Blockiosaurus Date: Thu, 20 Feb 2025 19:44:37 -0500 Subject: [PATCH] Revert "Fixing missing lifecycle impl" This reverts commit 8a81d3634d9c5c74f0a9aa5c0c0aa3c1d3818223. --- programs/mpl-core/src/plugins/lifecycle.rs | 24 ---------------------- programs/mpl-core/src/processor/update.rs | 9 ++++---- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/programs/mpl-core/src/plugins/lifecycle.rs b/programs/mpl-core/src/plugins/lifecycle.rs index f35cf306..ff079f0b 100644 --- a/programs/mpl-core/src/plugins/lifecycle.rs +++ b/programs/mpl-core/src/plugins/lifecycle.rs @@ -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)] @@ -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 { - plugin.inner().validate_execute(ctx) - } - /// Validate the add external plugin adapter lifecycle event. pub(crate) fn validate_add_external_plugin_adapter( plugin: &Plugin, @@ -642,14 +626,6 @@ pub(crate) trait PluginValidation { abstain!() } - /// Validate the execute lifecycle action. - fn validate_execute( - &self, - _ctx: &PluginValidationContext, - ) -> Result { - abstain!() - } - /// Validate the update_plugin lifecycle action. fn validate_update_external_plugin_adapter( &self, diff --git a/programs/mpl-core/src/processor/update.rs b/programs/mpl-core/src/processor/update.rs index be6883de..d09692d3 100644 --- a/programs/mpl-core/src/processor/update.rs +++ b/programs/mpl-core/src/processor/update.rs @@ -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::( - new_collection_account, - PluginType::UpdateDelegate, - )?; + let (plugin_authority, fetched_plugin, _) = fetch_plugin::( + new_collection_account, + PluginType::UpdateDelegate, + )?; if (assert_collection_authority( &new_collection,