Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions payjoin-ffi/src/receive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1289,18 +1289,6 @@ impl_save_for_transition!(PayjoinProposalTransition, Monitor);

#[uniffi::export]
impl PayjoinProposal {
pub fn utxos_to_be_locked(&self) -> Vec<OutPoint> {
let mut outpoints: Vec<OutPoint> = Vec::new();
for o in <PayjoinProposal as Into<
payjoin::receive::v2::Receiver<payjoin::receive::v2::PayjoinProposal>,
>>::into(self.clone())
.utxos_to_be_locked()
{
outpoints.push(OutPoint::from(*o));
}
outpoints
}

pub fn psbt(&self) -> String {
<PayjoinProposal as Into<
payjoin::receive::v2::Receiver<payjoin::receive::v2::PayjoinProposal>,
Expand Down
5 changes: 0 additions & 5 deletions payjoin/src/core/receive/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,6 @@ pub struct PayjoinProposal {
}

impl PayjoinProposal {
/// The UTXOs that would be spent by this Payjoin transaction.
pub fn utxos_to_be_locked(&self) -> impl '_ + Iterator<Item = &bitcoin::OutPoint> {
self.payjoin_psbt.unsigned_tx.input.iter().map(|input| &input.previous_output)
}

/// The Payjoin Proposal PSBT.
pub fn psbt(&self) -> &Psbt { &self.payjoin_psbt }
}
Expand Down
7 changes: 0 additions & 7 deletions payjoin/src/core/receive/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1258,13 +1258,6 @@ pub struct PayjoinProposal {
/// A finalized Payjoin proposal, complete with fees and receiver signatures, that the sender
/// should find acceptable.
impl Receiver<PayjoinProposal> {
/// The UTXOs that would be spent by this Payjoin transaction.
pub fn utxos_to_be_locked(&self) -> impl '_ + Iterator<Item = &bitcoin::OutPoint> {
// TODO: de-duplicate this with the v1 implementation
// It would make more sense if the payjoin proposal was only available after utxos are locked via session persister
self.psbt_context.payjoin_psbt.unsigned_tx.input.iter().map(|input| &input.previous_output)
}

/// The Payjoin Proposal PSBT.
pub fn psbt(&self) -> &Psbt { &self.psbt_context.payjoin_psbt }

Expand Down
Loading