This commit is contained in:
Håvard Kittelsen 2026-01-05 09:07:07 +01:00
parent 9a2223b36c
commit 842358f4c4

View file

@ -118,10 +118,7 @@ pub fn compute_score(tvl_sats: u64, vol_30d: u64) -> i64 {
}
// Convert safely; fall back to MAX on unexpected parse failure
match score_big.to_string().parse::<i64>() {
Ok(v) => v,
Err(_) => i64::MAX,
}
score_big.to_string().parse::<i64>().unwrap_or(i64::MAX)
}
pub fn resolve_decimals(bcmr_conn: &Connection, crc20_conn: &Connection, token_id: &str) -> u32 {
// On-chain BCMR (latest by height)