diff --git a/Cargo.lock b/Cargo.lock index 65015f5d69..4b7b673991 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -2152,7 +2152,6 @@ dependencies = [ "multiversx-sc-scenario", "multiversx-sdk", "serde_json", - "tokio", ] [[package]] diff --git a/framework/snippets/Cargo.toml b/framework/snippets/Cargo.toml index 036c4a327f..45cf5f39fc 100644 --- a/framework/snippets/Cargo.toml +++ b/framework/snippets/Cargo.toml @@ -14,7 +14,6 @@ keywords = ["multiversx", "blockchain", "contract", "snippets"] categories = ["cryptography::cryptocurrencies"] [dependencies] -tokio = { version = "1.24" } hex = "0.4" base64 = "0.22" log = "0.4.17" diff --git a/framework/snippets/src/imports.rs b/framework/snippets/src/imports.rs index a22c969887..e7fbdf2436 100644 --- a/framework/snippets/src/imports.rs +++ b/framework/snippets/src/imports.rs @@ -7,4 +7,4 @@ pub use crate::{ pub use multiversx_sdk::{data::keystore::InsertPassword, wallet::Wallet}; pub use env_logger; -pub use tokio; +pub use multiversx_sdk::tokio; diff --git a/framework/snippets/src/interactor.rs b/framework/snippets/src/interactor.rs index bb38873afe..76d2b37a35 100644 --- a/framework/snippets/src/interactor.rs +++ b/framework/snippets/src/interactor.rs @@ -61,7 +61,7 @@ impl Interactor { pub async fn sleep(&mut self, duration: Duration) { self.waiting_time_ms += duration.as_millis() as u64; - tokio::time::sleep(duration).await; + crate::tokio::time::sleep(duration).await; } pub async fn with_tracer>(mut self, path: P) -> Self { diff --git a/framework/snippets/src/lib.rs b/framework/snippets/src/lib.rs index 7d3b52c696..61d4ad485e 100644 --- a/framework/snippets/src/lib.rs +++ b/framework/snippets/src/lib.rs @@ -19,7 +19,7 @@ pub use multi::*; pub use multiversx_sc_scenario::{self, multiversx_sc}; pub use multiversx_sdk as erdrs; // TODO: remove pub use multiversx_sdk as sdk; -pub use tokio; +pub use multiversx_sdk::tokio; /// Imports normally needed in interactors, grouped together. pub mod imports; diff --git a/sdk/core/src/lib.rs b/sdk/core/src/lib.rs index 3a1db99fd7..c0e0379587 100644 --- a/sdk/core/src/lib.rs +++ b/sdk/core/src/lib.rs @@ -3,3 +3,6 @@ pub mod data; pub mod gateway; pub mod utils; pub mod wallet; + +/// Re-exported for convenience. +pub use tokio;