Skip to content

Refactor unified_qr.rs to use bitcoin-payment-instructions #607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/payment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mod bolt12;
mod onchain;
mod spontaneous;
pub(crate) mod store;
mod unified_qr;
mod unified;

pub use bolt11::Bolt11Payment;
pub use bolt12::Bolt12Payment;
Expand All @@ -21,7 +21,7 @@ pub use spontaneous::SpontaneousPayment;
pub use store::{
ConfirmationStatus, LSPFeeLimits, PaymentDetails, PaymentDirection, PaymentKind, PaymentStatus,
};
pub use unified_qr::{QrPaymentResult, UnifiedQrPayment};
pub use unified::{QrPaymentResult, UnifiedQrPayment};

/// Represents information used to send a payment.
#[derive(Clone, Debug, PartialEq)]
Expand Down
2 changes: 1 addition & 1 deletion src/payment/unified_qr.rs → src/payment/unified.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl DeserializationError for Extras {
#[cfg(test)]
mod tests {
use super::*;
use crate::payment::unified_qr::Extras;
use crate::payment::unified::Extras;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think we can just drop this line as the super::* import above covers Extras. Although, it would actually be preferable to switch to explicit import here, i.e., use super::{Extras, ...}.

use bitcoin::{Address, Network};
use std::str::FromStr;

Expand Down