Skip to content

Commit fdd322d

Browse files
committed
update rust code for v2
1 parent 5562ea2 commit fdd322d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

program/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn process_instruction(
3131
msg!("Pyth product account provided is not a valid Pyth product account");
3232
return Err(ProgramError::InvalidArgument.into());
3333
}
34-
if pyth_product.ver != pyth_client::VERSION_1 {
34+
if pyth_product.ver != pyth_client::VERSION_2 {
3535
msg!("Pyth product account provided has a different version than the Pyth client");
3636
return Err(ProgramError::InvalidArgument.into());
3737
}
@@ -69,8 +69,6 @@ fn get_price_type(ptype: &PriceType) -> &'static str {
6969
match ptype {
7070
PriceType::Unknown => "unknown",
7171
PriceType::Price => "price",
72-
PriceType::TWAP => "twap",
73-
PriceType::Volatility => "volatility",
7472
}
7573
}
7674

0 commit comments

Comments
 (0)