Skip to content

Commit

Permalink
fixing dependencies for MSRV 1.57.0
Browse files Browse the repository at this point in the history
  • Loading branch information
willowens14 committed Sep 21, 2023
1 parent 17911ce commit 1323c63
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }

Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```

Expand Down
6 changes: 4 additions & 2 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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",
Expand Down
7 changes: 3 additions & 4 deletions src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1323c63

Please sign in to comment.