From 2936a995f16443481c538e3776599cd4aa858671 Mon Sep 17 00:00:00 2001 From: Nour Alharithi Date: Tue, 16 Jul 2024 13:24:42 -0700 Subject: [PATCH] validate fix --- programs/drift/src/instructions/pyth_pull_oracle.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/drift/src/instructions/pyth_pull_oracle.rs b/programs/drift/src/instructions/pyth_pull_oracle.rs index a2e6f2f8f..ec9ddbce9 100644 --- a/programs/drift/src/instructions/pyth_pull_oracle.rs +++ b/programs/drift/src/instructions/pyth_pull_oracle.rs @@ -55,7 +55,7 @@ pub fn handle_update_pyth_pull_oracle( validate!( price_feed_account.price_message.feed_id == feed_id, ErrorCode::OraclePriceFeedMessageMismatch - ); + )?; } } Ok(()) @@ -100,7 +100,7 @@ pub fn handle_post_pyth_pull_oracle_update_atomic( validate!( price_feed_account.price_message.feed_id == feed_id, ErrorCode::OraclePriceFeedMessageMismatch - ); + )?; } } Ok(()) @@ -114,7 +114,7 @@ pub fn handle_post_multi_pyth_pull_oracle_updates_atomic<'c: 'info, 'info>( validate!( remaining_accounts.len() <= 2, ErrorCode::OracleTooManyPriceAccountUpdates - ); + )?; let update_param = PostMultiUpdatesAtomicParams::deserialize(&mut ¶ms[..]).unwrap(); let vaa = update_param.vaa; let merkle_price_updates = update_param.merkle_price_updates; @@ -122,7 +122,7 @@ pub fn handle_post_multi_pyth_pull_oracle_updates_atomic<'c: 'info, 'info>( validate!( remaining_accounts.len() == merkle_price_updates.len(), ErrorCode::OracleMismatchedVaaAndPriceUpdates - ); + )?; for (account, merkle_price_update) in remaining_accounts.iter().zip(merkle_price_updates.iter()) {