Skip to content

Commit

Permalink
Remove unnecessary, misnamed fn extract_v1_req
Browse files Browse the repository at this point in the history
This function does NOT extract the request nor the complete body and
is better represented by an direct call to the internal behavior.
  • Loading branch information
DanGould committed Jan 8, 2025
1 parent 149f40d commit 5c78a15
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions payjoin/src/receive/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,6 @@ impl PayjoinProposal {

pub fn psbt(&self) -> &Psbt { self.v1.psbt() }

pub fn extract_v1_req(&self) -> String { self.v1.psbt().to_string() }

#[cfg(feature = "v2")]
pub fn extract_v2_req(&mut self) -> Result<(Request, ohttp::ClientResponse), Error> {
let target_resource: Url;
Expand All @@ -488,7 +486,7 @@ impl PayjoinProposal {
method = "POST";
} else {
// Prepare v2 wrapped and backwards-compatible v1 payload
body = self.extract_v1_req().as_bytes().to_vec();
body = self.v1.psbt().to_string().as_bytes().to_vec();
let receiver_subdir = subdir_path_from_pubkey(self.context.s.public_key());
target_resource = self
.context
Expand Down

0 comments on commit 5c78a15

Please sign in to comment.