Skip to content

Commit cc796ed

Browse files
committed
Bump payjoin v0.8.0
1 parent d8ecb21 commit cc796ed

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ miniscript_crate = { package = "miniscript", version = "9.0.1", features = [
6060
] }
6161
nostr-sdk = "0.22.0"
6262
once_cell = "1.17.1"
63-
payjoin = { version = "0.7.0", features = ["sender"] }
63+
payjoin = { version = "0.8.0", features = ["send"] }
6464
percent-encoding = "2.2.0"
6565
postcard = { version = "1.0.4", features = ["alloc"] }
6666
pretty_env_logger = "0.5.0"

src/bitcoin/payment.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
use anyhow::{anyhow, Result};
22

3-
use bdk::{
4-
database::AnyDatabase, wallet::tx_builder::TxOrdering, FeeRate, TransactionDetails, Wallet,
5-
};
3+
use bdk::{wallet::tx_builder::TxOrdering, FeeRate, TransactionDetails};
64

7-
use bitcoin::consensus::{
5+
use bitcoin::{
86
consensus::serialize,
97
psbt::{Input, Psbt},
108
TxIn,
@@ -67,7 +65,7 @@ pub async fn create_payjoin(
6765
info!("Original PSBT successfully signed");
6866

6967
// TODO use fee_rate
70-
let pj_params = payjoin::sender::Configuration::non_incentivizing();
68+
let pj_params = payjoin::send::Configuration::non_incentivizing();
7169
let (req, ctx) = pj_uri.create_pj_request(original_psbt.clone(), pj_params)?;
7270
info!("Built PayJoin request");
7371
let response = reqwest::Client::new()
@@ -85,7 +83,7 @@ pub async fn create_payjoin(
8583
return Err(anyhow!("Error performing payjoin: {res}"));
8684
}
8785

88-
let payjoin_psbt = ctx.process_response(res.as_bytes())?;
86+
let payjoin_psbt = ctx.process_response(&mut res.as_bytes())?;
8987
let payjoin_psbt = add_back_original_input(&original_psbt, payjoin_psbt);
9088

9189
debug!(

0 commit comments

Comments
 (0)