Skip to content

Commit b9dc894

Browse files
committed
feat: get_data_median refactor
1 parent e28281a commit b9dc894

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pragma-oracle/src/oracle/oracle.cairo

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)