File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
examples/sol-anchor-contract/programs/example-sol-anchor-contract/src Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,6 @@ pub struct QueryRequest<'info> {
3535pub mod example_sol_anchor_contract {
3636 use super :: * ;
3737
38- const STALENESS_THRESHOLD : u64 = 60 ; // staleness threshold in seconds
39-
4038 pub fn init ( ctx : Context < InitRequest > , config : AdminConfig ) -> Result < ( ) > {
4139 ctx. accounts . config . set_inner ( config) ;
4240 Ok ( ( ) )
@@ -55,7 +53,7 @@ pub mod example_sol_anchor_contract {
5553 // https://docs.pyth.network/consume-data/best-practices
5654 let current_timestamp1 = Clock :: get ( ) ?. unix_timestamp ;
5755 let loan_price = loan_feed
58- . get_price_no_older_than ( current_timestamp1, STALENESS_THRESHOLD )
56+ . get_price_no_older_than ( current_timestamp1, 60 )
5957 . ok_or ( ErrorCode :: PythOffline ) ?;
6058 let loan_max_price = loan_price
6159 . price
You can’t perform that action at this time.
0 commit comments