computer: fix open of ohlc if fetched from different API than prev ohlc

This commit is contained in:
nym21
2025-06-15 17:27:16 +02:00
parent 3b6e3f47ab
commit 12252f407b
3 changed files with 21 additions and 6 deletions
@@ -96,9 +96,10 @@ impl BlkIndexToBlkRecap {
}
pub fn export(&self) {
let file = File::create(&self.path).unwrap_or_else(|_| {
let file = File::create(&self.path).unwrap_or_else(|e| {
dbg!(e);
dbg!(&self.path);
panic!("No such file or directory")
panic!("Cannot write file");
});
serde_json::to_writer(&mut BufWriter::new(file), &self.tree).unwrap();