File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -487,11 +487,7 @@ mod Oracle {
487487 // @param data_type: an enum of DataType (e.g : DataType::SpotEntry(ASSET_ID) or DataType::FutureEntry((ASSSET_ID, expiration_timestamp)))
488488 // @returns a PragmaPricesResponse, a structure providing the main information for an asset (see entry/structs for details)
489489 fn get_data_median (self : @ ContractState , data_type : DataType ) -> PragmaPricesResponse {
490- let sources = IOracleABI :: get_all_sources (self , data_type );
491- let prices_response : PragmaPricesResponse = IOracleABI :: get_data_for_sources (
492- self , data_type , AggregationMode :: Median (()), sources
493- );
494- prices_response
490+ IOracleABI :: get_data (self , data_type , AggregationMode :: Median (()))
495491 }
496492
497493 // @notice aggregate the entries for specific sources, for a given data type, using MEDIAN as aggregation mode
@@ -1614,6 +1610,7 @@ mod Oracle {
16141610 // @notice add a new pair to the list of registered conversion rate pairs
16151611 // @param new_pair_id: the pair id to be added
16161612 fn add_registered_conversion_rate_pair (ref self : ContractState , new_pair_id : felt252 ) {
1613+ OracleInternal :: assert_only_admin ();
16171614 let mut registered_pairs = self . conversion_rate_compatible_pairs. read ();
16181615 registered_pairs . append (new_pair_id );
16191616 }
You can’t perform that action at this time.
0 commit comments