From ab7335d21d0f0c8e4b2f6c2eff04eb13fdd84c9b Mon Sep 17 00:00:00 2001 From: Jay Little Date: Tue, 9 Jan 2018 06:17:01 -0500 Subject: [PATCH] Use https connection (#7503) Use https when connecting to etherscan.io API for price-info --- price-info/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/price-info/src/lib.rs b/price-info/src/lib.rs index 7036cfefc..ec3c363a4 100644 --- a/price-info/src/lib.rs +++ b/price-info/src/lib.rs @@ -86,7 +86,7 @@ impl cmp::PartialEq for Client { impl Client { /// Creates a new instance of the `Client` given a `fetch::Client`. pub fn new(fetch: F) -> Client { - let api_endpoint = "http://api.etherscan.io/api?module=stats&action=ethprice".to_owned(); + let api_endpoint = "https://api.etherscan.io/api?module=stats&action=ethprice".to_owned(); Client { api_endpoint, fetch } } @@ -144,7 +144,7 @@ mod test { type Result = FutureResult; fn new() -> Result where Self: Sized { Ok(FakeFetch(None, Default::default())) } fn fetch_with_abort(&self, url: &str, _abort: fetch::Abort) -> Self::Result { - assert_eq!(url, "http://api.etherscan.io/api?module=stats&action=ethprice"); + assert_eq!(url, "https://api.etherscan.io/api?module=stats&action=ethprice"); let mut val = self.1.lock(); *val = *val + 1; if let Some(ref response) = self.0 {