Make health iteration code work with pyth oracles
They have a different account owner, that error must be skipped.
This commit is contained in:
parent
946e6b1c96
commit
536ec8a84a
|
@ -92,7 +92,8 @@ pub fn margin_trade<'key, 'accounts, 'remaining, 'info>(
|
|||
allowed_banks.insert(ai.key, bank);
|
||||
}
|
||||
Err(Error::AnchorError(error))
|
||||
if error.error_code_number == ErrorCode::AccountDiscriminatorMismatch as u32 =>
|
||||
if error.error_code_number == ErrorCode::AccountDiscriminatorMismatch as u32
|
||||
|| error.error_code_number == ErrorCode::AccountOwnedByWrongProgram as u32 =>
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,9 @@ impl<'a, 'b> ScanningAccountRetriever<'a, 'b> {
|
|||
}
|
||||
Err(Error::AnchorError(error))
|
||||
if error.error_code_number
|
||||
== ErrorCode::AccountDiscriminatorMismatch as u32 =>
|
||||
== ErrorCode::AccountDiscriminatorMismatch as u32
|
||||
|| error.error_code_number
|
||||
== ErrorCode::AccountOwnedByWrongProgram as u32 =>
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue