From dc6f5703e499eeb0d0cedb0071b5b0e737661975 Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Fri, 8 Oct 2021 09:49:01 +1100 Subject: [PATCH] Fix URl to fetch attestations `https://h00.ooo//x/BitMEX/BXBT/2021-10-08T03:00:00.price[n:20]` for attestations because the event includes a leading slash. Fixed by removing it from the base url and adding a specific slash when fetching events. --- daemon/src/oracle.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/src/oracle.rs b/daemon/src/oracle.rs index be78ff7..c45e96c 100644 --- a/daemon/src/oracle.rs +++ b/daemon/src/oracle.rs @@ -15,7 +15,7 @@ use std::collections::HashSet; use std::convert::TryFrom; /// Where `olivia` is located. -const OLIVIA_URL: &str = "https://h00.ooo/"; +const OLIVIA_URL: &str = "https://h00.ooo"; const OLIVIA_EVENT_TIME_FORMAT: &[FormatItem] = format_description!("[year]-[month]-[day]T[hour]:[minute]:[second]"); @@ -231,7 +231,7 @@ fn event_url(datetime: OffsetDateTime) -> String { .format(&OLIVIA_EVENT_TIME_FORMAT) .expect("valid formatter for datetime"); - format!("{}x/BitMEX/BXBT/{}.price[n:20]", OLIVIA_URL, datetime) + format!("{}/x/BitMEX/BXBT/{}.price[n:20]", OLIVIA_URL, datetime) } #[derive(Debug, Clone, serde::Deserialize, PartialEq)]