From 57b07bfdc88dbc6b86f2008c0879b04b2b304da8 Mon Sep 17 00:00:00 2001 From: canonbrother Date: Thu, 19 Dec 2024 18:42:58 +0800 Subject: [PATCH] decimal --- lib/ain-ocean/src/api/prices.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ain-ocean/src/api/prices.rs b/lib/ain-ocean/src/api/prices.rs index 5192ead881..7b55a01165 100644 --- a/lib/ain-ocean/src/api/prices.rs +++ b/lib/ain-ocean/src/api/prices.rs @@ -213,7 +213,7 @@ async fn get_feed( token: token.clone(), currency: currency.clone(), aggregated: OraclePriceAggregatedAggregatedResponse { - amount: format!("{:.8}", v.aggregated.amount), + amount: format!("{:.8}", v.aggregated.amount / Decimal::from(COIN)), weightage: v.aggregated.weightage.to_i32().unwrap_or_default(), oracles: OraclePriceActiveNextOraclesResponse { active: v.aggregated.oracles.active.to_i32().unwrap_or_default(),