Skip to content

Commit

Permalink
fix: warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0rgal committed Mar 15, 2024
1 parent bd8e9eb commit 9a8c168
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/endpoints/get_altcoin_quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ pub struct AddrQuery {
#[derive(Deserialize, Debug)]
pub struct AvnuApiResult {
address: FieldElement,
currentPrice: f64,
#[serde(rename = "currentPrice")]
current_price: f64,
}

lazy_static::lazy_static! {
Expand Down Expand Up @@ -63,7 +64,7 @@ pub async fn handler(
let max_validity_timestamp = (now
+ Duration::seconds(altcoin_data.max_quote_validity))
.timestamp();
let quote = 1.0 / data.currentPrice;
let quote = 1.0 / data.current_price;
// check if quote is within the valid range
if quote < altcoin_data.min_price as f64
|| quote > altcoin_data.max_price as f64
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/renewal/get_renewal_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use axum::{
};
use axum_auto_routes::route;
use futures::StreamExt;
use mongodb::{bson::doc, options::FindOptions};
use mongodb::bson::doc;
use serde::{Deserialize, Serialize};
use starknet::core::types::FieldElement;
use std::sync::Arc;
Expand Down

0 comments on commit 9a8c168

Please sign in to comment.