global: fixes

This commit is contained in:
nym21
2026-04-27 19:19:14 +02:00
parent 6c8afc942c
commit 66494c081c
16 changed files with 1453 additions and 5399 deletions
+1 -4
View File
@@ -119,10 +119,7 @@ fn cost_basis_formatted(
FxHashMap::with_capacity_and_hasher(raw.map.len(), Default::default());
for (&price_cents, &sats) in &raw.map {
let price = Cents::from(price_cents);
let key = match agg {
UrpdAggregation::Raw => price,
_ => agg.bucket_floor(price).unwrap_or(price),
};
let key = agg.bucket_floor(price);
let entry = bucketed.entry(key).or_insert((Sats::ZERO, Dollars::ZERO));
entry.0 += sats;
if needs_realized {