diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index 2695e3b..c1a48b9 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -57,10 +57,11 @@ jobs: cargo update -p tempfile --precise 3.6.0 cargo update -p base64ct --precise 1.5.3 cargo update -p cc --precise 1.0.81 - cargo update -p tokio --precise 1.29.1 cargo update -p flate2 --precise 1.0.26 - cargo update -p reqwest --precise "0.11.18" - cargo update -p h2 --precise "0.3.20" + cargo update -p h2:0.3.21 --precise "0.3.20" + cargo update -p reqwest:0.11.20 --precise "0.11.18" + cargo update -p tokio:1.32.0 --precise 1.29.1 + cargo update -p tokio-util:0.7.9 --precise 0.7.8 cargo update -p rustls --precise "0.20.8" - name: Build diff --git a/Cargo.toml b/Cargo.toml index 1d15bb3..5ddd2db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ dirs-next = "2.0" env_logger = "0.7" base64 = "^0.13" # payjoin dependencies -payjoin = { version = "=0.8.2", features = ["send"] } +payjoin = { version = "=0.8.2", features = ["send"] } # reqwest reqwest = { version = "0.10.10", features = ["blocking"] } diff --git a/README.md b/README.md index 0349504..7348efa 100644 --- a/README.md +++ b/README.md @@ -135,16 +135,17 @@ cargo update -p tempfile --precise 3.6.0 cargo update -p base64ct --precise 1.5.3 # cc 1.0.82 is throwing error with rust 1.57.0, "error[E0599]: no method named `retain_mut`..." cargo update -p cc --precise 1.0.81 -# tokio 0.30.0 has MSRV 1.63.0 -cargo update -p tokio --precise 1.29.1 + +cargo update -p rustls --precise "0.20.8" # flate2 1.0.27 has MSRV 1.63.0+ cargo update -p flate2 --precise 1.0.26 + +cargo update -p h2:0.3.21 --precise "0.3.20" # reqwest 0.11.19 has MSRV 1.63.0+ -cargo update -p reqwest --precise "0.11.18" -# h2 0.3.21 has MSRV 1.63.0+ -cargo update -p h2 --precise "0.3.20" -# rustls 0.20.9 has MSRV 1.60.0+ -cargo update -p rustls --precise "0.20.8" +cargo update -p reqwest:0.11.20 --precise "0.11.18" +# tokio 0.32.0 has MSRV 1.63.0 +cargo update -p tokio:1.32.0 --precise 1.29.1 +cargo update -p tokio-util:0.7.9 --precise 0.7.8 ``` diff --git a/src/commands.rs b/src/commands.rs index e391b12..3e74e13 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -527,7 +527,7 @@ pub enum OnlineWalletSubCommand { #[clap(name = "CONFIRMATIONS", long = "confirmations", default_value = "6")] confirmations: u32, }, - #[cfg(not(feature = "async-interface"))] + #[cfg(any(feature = "electrum", feature = "esplora-ureq",))] /// Sends a Payjoin Transaction. Takes a valid payjoin bip21 uri. SendPayjoin { /// Sets the bip21 uri to send to. @@ -623,13 +623,15 @@ mod test { use std::str::{self, FromStr}; use super::OfflineWalletSubCommand::{BumpFee, CreateTx, GetNewAddress}; + #[cfg(any(feature = "electrum", feature = "esplora-ureq",))] + use super::OnlineWalletSubCommand::SendPayjoin; #[cfg(any( feature = "electrum", feature = "esplora", feature = "compact_filters", feature = "rpc" ))] - use super::OnlineWalletSubCommand::{Broadcast, SendPayjoin, Sync}; + use super::OnlineWalletSubCommand::{Broadcast, Sync}; use super::WalletSubCommand::OfflineWalletSubCommand; #[cfg(any( feature = "electrum", diff --git a/src/handlers.rs b/src/handlers.rs index 2582366..61ea8f2 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -322,10 +322,9 @@ where B: Blockchain, D: BatchDatabase, { - use crate::bitcoin::psbt::Input; use bdk::SyncOptions; - use payjoin::PjUriExt; - use payjoin::UriExt; + #[cfg(any(feature = "electrum", feature = "esplora-ureq",))] + use payjoin::{bitcoin::psbt::Input, PjUriExt, UriExt}; use std::convert::TryFrom; match online_subcommand { @@ -399,7 +398,7 @@ where Ok(json!({ "spendable": spendable })) } - #[cfg(not(feature = "async-interface"))] + #[cfg(any(feature = "electrum", feature = "esplora-ureq",))] // Payjoin Logic goes here SendPayjoin { uri } => { // convert the bip21 uri into a payjoin uri, and handle error if necessary