Skip to content

Commit ad8285d

Browse files
committed
Rename from_proposal to from_original
Using bip77 nomenclature.
1 parent c3e6ff5 commit ad8285d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

payjoin/src/core/receive/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,11 @@ pub struct WantsOutputs {
517517
}
518518

519519
impl WantsOutputs {
520-
pub(crate) fn from_proposal(proposal: Original, owned_vouts: Vec<usize>) -> Self {
520+
pub(crate) fn from_original(original: Original, owned_vouts: Vec<usize>) -> Self {
521521
Self {
522-
original_psbt: proposal.psbt.clone(),
523-
payjoin_psbt: proposal.psbt,
524-
params: proposal.params,
522+
original_psbt: original.psbt.clone(),
523+
payjoin_psbt: original.psbt,
524+
params: original.params,
525525
change_vout: owned_vouts[0],
526526
owned_vouts,
527527
}

payjoin/src/core/receive/v1/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl OutputsUnknown {
205205
// In case of there being multiple outputs paying to the receiver, we select the first one
206206
// as the `change_vout`, which we will default to when making single output changes in
207207
// future mutating typestates.
208-
Ok(WantsOutputs::from_proposal(self.original, owned_vouts))
208+
Ok(WantsOutputs::from_original(self.original, owned_vouts))
209209
}
210210
}
211211

@@ -269,8 +269,8 @@ impl WantsOutputs {
269269
#[cfg_attr(not(feature = "v1"), allow(dead_code))]
270270
pub fn commit_outputs(self) -> WantsInputs { WantsInputs::from_wants_outputs(self.inner) }
271271

272-
pub(crate) fn from_proposal(proposal: Original, owned_vouts: Vec<usize>) -> Self {
273-
Self { inner: crate::receive::WantsOutputs::from_proposal(proposal, owned_vouts) }
272+
pub(crate) fn from_original(original: Original, owned_vouts: Vec<usize>) -> Self {
273+
Self { inner: crate::receive::WantsOutputs::from_original(original, owned_vouts) }
274274
}
275275
}
276276

payjoin/src/core/receive/v2/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ impl Receiver<OutputsUnknown> {
706706
},
707707
};
708708
let wants_outputs =
709-
crate::receive::WantsOutputs::from_proposal(self.state.original, owned_vouts);
709+
crate::receive::WantsOutputs::from_original(self.state.original, owned_vouts);
710710
MaybeFatalTransition::success(
711711
SessionEvent::WantsOutputs(wants_outputs.clone()),
712712
Receiver {

0 commit comments

Comments
 (0)