Skip to content

Commit

Permalink
fix OraclePriceAggregatedIntervalResponse sort
Browse files Browse the repository at this point in the history
  • Loading branch information
canonbrother committed Dec 19, 2024
1 parent 24a7145 commit be0e724
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ain-ocean/src/api/prices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ pub struct OraclePriceAggregatedIntervalResponse {
pub currency: Currency,
pub aggregated: OraclePriceAggregatedIntervalAggregatedResponse,
pub block: BlockContext,

}

#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down Expand Up @@ -381,7 +380,9 @@ async fn get_feed_with_interval(
let next = query
.next
.map(|q| {
let height = q.parse::<u32>()?.to_be_bytes();
let height = hex::decode(q)?
.try_into()
.map_err(|_| Error::ToArrayError)?;
Ok::<[u8; 4], Error>(height)
})
.transpose()?
Expand Down

0 comments on commit be0e724

Please sign in to comment.