You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msg!("Starting Pyth price check program"); let account_info_iter = &mut accounts.iter(); let pyth_account = next_account_info(account_info_iter)?; // Get the current time from the Clock sysvar let clock = Clock::get()?; let current_time = clock.unix_timestamp; const STALENESS_THRESHOLD: u64 = 60; // staleness threshold in seconds // Load the price feed from the account info // let price_feed = load_price_feed_from_account_info(pyth_account)?; let price_feed: PriceFeed = SolanaPriceAccount::account_info_to_feed(pyth_account)?; let current_price: Price = price_feed .get_price_no_older_than(current_time, STALENESS_THRESHOLD) .ok_or(ProgramError::InvalidArgument)?;
I got this error
The text was updated successfully, but these errors were encountered:
when i build this project
I got this error
The text was updated successfully, but these errors were encountered: