File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ pub enum NTTError {
6969 InvalidReturnAccount ,
7070 #[ msg( "Missing payer account" ) ]
7171 MissingPayerAccount ,
72+ #[ msg( "No whitelisted extensions in swap global" ) ]
73+ NoWhitelistedExtensions ,
7274}
7375
7476impl From < ScalingError > for NTTError {
Original file line number Diff line number Diff line change @@ -407,6 +407,12 @@ pub fn resolve_execute_vaa_v1<'a>(
407407 }
408408
409409 // Find the extension program ID based on the destination mint
410+ // Handle case where no extensions are whitelisted
411+ if swap_global_data. whitelisted_extensions . is_empty ( ) {
412+ msg ! ( "Cannot bridge to extension since none are whitelisted" ) ;
413+ return err ! ( NTTError :: NoWhitelistedExtensions ) ;
414+ }
415+
410416 let ext_program = swap_global_data
411417 . whitelisted_extensions
412418 . iter ( )
You can’t perform that action at this time.
0 commit comments