diff --git a/Cargo.lock b/Cargo.lock index 9f07a3b58..754d97c5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3880,7 +3880,6 @@ dependencies = [ "indexer-monitor", "indexer-watcher", "ipfs-api-backend-hyper", - "ipfs-api-prelude", "prost", "rand 0.9.0", "serde", diff --git a/crates/dips/Cargo.toml b/crates/dips/Cargo.toml index bca1263d7..085f93565 100644 --- a/crates/dips/Cargo.toml +++ b/crates/dips/Cargo.toml @@ -26,7 +26,6 @@ futures = "0.3" http = "0.2" prost = { workspace = true, optional = true } ipfs-api-backend-hyper = { version = "0.6.0", features = ["with-send-sync", "with-hyper-tls"] } -ipfs-api-prelude = { version = "0.6.0", features = ["with-send-sync"] } serde_yaml.workspace = true serde.workspace = true sqlx = { workspace = true, optional = true } diff --git a/crates/dips/src/ipfs.rs b/crates/dips/src/ipfs.rs index 0b9e38f14..9279081a4 100644 --- a/crates/dips/src/ipfs.rs +++ b/crates/dips/src/ipfs.rs @@ -1,15 +1,13 @@ // Copyright 2023-, Edge & Node, GraphOps, and Semiotic Labs. // SPDX-License-Identifier: Apache-2.0 -use std::{str::FromStr, sync::Arc}; +use std::sync::Arc; use async_trait::async_trait; use derivative::Derivative; use futures::TryStreamExt; -use http::Uri; -use ipfs_api_prelude::{IpfsApi, TryFromUri}; +use ipfs_api_backend_hyper::{IpfsApi, TryFromUri}; use serde::Deserialize; -use tracing; use crate::DipsError; @@ -34,11 +32,8 @@ pub struct IpfsClient { impl IpfsClient { pub fn new(url: &str) -> anyhow::Result { - Ok(Self { - client: ipfs_api_backend_hyper::IpfsClient::build_with_base_uri( - Uri::from_str(url).map_err(anyhow::Error::from)?, - ), - }) + let client = ipfs_api_backend_hyper::IpfsClient::from_str(url)?; + Ok(Self { client }) } }