fix bug where flash loans couldnt be executed by delegates (#552)

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2023-04-19 16:17:26 +02:00 committed by GitHub
parent 81571664bd
commit 55bfcc3a76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -137,7 +137,8 @@ pub fn flash_loan_begin<'key, 'accounts, 'remaining, 'info>(
require_msg!(
ix.program_id == AssociatedToken::id()
|| ix.program_id == jupiter_mainnet_3::ID
|| ix.program_id == jupiter_mainnet_4::ID,
|| ix.program_id == jupiter_mainnet_4::ID
|| ix.program_id == crate::id(),
"delegate is only allowed to pass in ixs to ATA or Jupiter v3 or v4 programs"
);
}