bugfix: prices in wrong interval

This commit is contained in:
Dagur Valberg Johannsson 2024-02-06 13:58:50 +01:00
parent 1d5f4a845c
commit 861ce15a39
No known key found for this signature in database
GPG key ID: FD701804AEE88107

View file

@ -365,8 +365,14 @@ pub fn historic_price(
if let Some(r) = current_interval.to_result() {
result.push(r);
}
current_interval = current_interval.next();
loop {
current_interval = current_interval.next();
if timestamp < current_interval.end() {
break;
}
}
}
current_interval.add_pool(sats, tokens);
}