Skip to content

Commit 1b42be6

Browse files
committed
Remove fully qualified paths for receiver types
The full paths are often hard to read and create noise in this file.
1 parent c8b860d commit 1b42be6

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

payjoin-cli/src/app/v2/mod.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use payjoin::bitcoin::consensus::encode::serialize_hex;
55
use payjoin::bitcoin::psbt::Psbt;
66
use payjoin::bitcoin::{Amount, FeeRate};
77
use payjoin::receive::v2::{
8-
NewReceiver, PayjoinProposal, Receiver, UncheckedProposal, WithContext,
8+
NewReceiver, PayjoinProposal, ProvisionalProposal, Receiver, UncheckedProposal, WantsInputs,
9+
WithContext,
910
};
1011
use payjoin::receive::{Error, ReplyableError};
1112
use payjoin::send::v2::{Sender, SenderBuilder};
@@ -243,8 +244,8 @@ impl App {
243244

244245
async fn long_poll_fallback(
245246
&self,
246-
session: &mut payjoin::receive::v2::Receiver<WithContext>,
247-
) -> Result<payjoin::receive::v2::Receiver<UncheckedProposal>> {
247+
session: &mut Receiver<WithContext>,
248+
) -> Result<Receiver<UncheckedProposal>> {
248249
let ohttp_relay = self.unwrap_relay_or_else_fetch().await?;
249250

250251
loop {
@@ -263,8 +264,8 @@ impl App {
263264

264265
fn process_v2_proposal(
265266
&self,
266-
proposal: payjoin::receive::v2::Receiver<UncheckedProposal>,
267-
) -> Result<payjoin::receive::v2::Receiver<PayjoinProposal>, Error> {
267+
proposal: Receiver<UncheckedProposal>,
268+
) -> Result<Receiver<PayjoinProposal>, Error> {
268269
let wallet = self.wallet();
269270

270271
// in a payment processor where the sender could go offline, this is where you schedule to broadcast the original_tx
@@ -342,12 +343,9 @@ async fn handle_recoverable_error(
342343
}
343344

344345
fn try_contributing_inputs(
345-
payjoin: payjoin::receive::v2::Receiver<payjoin::receive::v2::WantsInputs>,
346+
payjoin: Receiver<WantsInputs>,
346347
wallet: &BitcoindWallet,
347-
) -> Result<
348-
payjoin::receive::v2::Receiver<payjoin::receive::v2::ProvisionalProposal>,
349-
ImplementationError,
350-
> {
348+
) -> Result<Receiver<ProvisionalProposal>, ImplementationError> {
351349
let candidate_inputs = wallet.list_unspent()?;
352350

353351
let selected_input =

0 commit comments

Comments
 (0)