@@ -166,19 +166,7 @@ pub(crate) fn update_plugin_v2<'a>(
166166 // Accounts.
167167 let ctx = UpdatePluginV2Accounts :: context ( accounts) ?;
168168
169- // Guards.
170- assert_signer ( ctx. accounts . payer ) ?;
171- let _authority = resolve_authority ( ctx. accounts . payer , ctx. accounts . authority ) ?;
172-
173- if ctx. accounts . system_program . key != & solana_program:: system_program:: ID {
174- return Err ( MplCoreError :: InvalidSystemProgram . into ( ) ) ;
175- }
176-
177- if let Some ( log_wrapper) = ctx. accounts . log_wrapper {
178- if log_wrapper. key != & spl_noop:: ID {
179- return Err ( MplCoreError :: InvalidLogWrapperProgram . into ( ) ) ;
180- }
181- }
169+ // account checks will be done in update_plugin
182170
183171 let plugin: Plugin = if ctx. accounts . buffer_account . is_some ( ) {
184172 Plugin :: try_from_slice ( & ctx. accounts . buffer_account . unwrap ( ) . data . borrow ( ) [ ..] ) ?
@@ -330,28 +318,14 @@ pub(crate) fn update_collection_plugin_v2<'a>(
330318 // Accounts.
331319 let ctx = UpdateCollectionPluginV2Accounts :: context ( accounts) ?;
332320
333- // Guards.
334- assert_signer ( ctx. accounts . payer ) ?;
335- let _authority = resolve_authority ( ctx. accounts . payer , ctx. accounts . authority ) ?;
336-
337- if ctx. accounts . system_program . key != & solana_program:: system_program:: ID {
338- return Err ( MplCoreError :: InvalidSystemProgram . into ( ) ) ;
339- }
340-
341- if let Some ( log_wrapper) = ctx. accounts . log_wrapper {
342- if log_wrapper. key != & spl_noop:: ID {
343- return Err ( MplCoreError :: InvalidLogWrapperProgram . into ( ) ) ;
344- }
345- }
321+ // account checks will be done in update_plugin
346322
347323 let plugin: Plugin = if ctx. accounts . buffer_account . is_some ( ) {
348324 Plugin :: try_from_slice ( & ctx. accounts . buffer_account . unwrap ( ) . data . borrow ( ) [ ..] ) ?
349325 } else {
350326 args. plugin . unwrap ( )
351327 } ;
352328
353- msg ! ( "plugin: {:?}" , plugin) ;
354-
355329 update_collection_plugin ( accounts, UpdateCollectionPluginV1Args { plugin : plugin } ) ?;
356330
357331 Ok ( ( ) )
0 commit comments