Skip to content

Commit

Permalink
sdk-common: simplify prelude (#1078)
Browse files Browse the repository at this point in the history
  • Loading branch information
ok300 authored Aug 20, 2024
1 parent 282f84d commit 14715a7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions libs/sdk-common/src/input_parser.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::str::FromStr;

use ::bip21::Uri;
use anyhow::{anyhow, Result};
use bip21::Uri;
use bitcoin::bech32;
use bitcoin::bech32::FromBase32;
use serde::{Deserialize, Serialize};
Expand All @@ -10,9 +10,6 @@ use LnUrlRequestData::*;

use crate::prelude::*;

#[cfg(feature = "liquid")]
use self::liquid::bip21::LiquidAddressData;

/// Parses generic user input, typically pasted from clipboard or scanned from a QR.
///
/// # Examples
Expand Down
3 changes: 0 additions & 3 deletions libs/sdk-common/src/invoice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ use serde::{Deserialize, Serialize};

use crate::prelude::*;

#[cfg(feature = "liquid")]
use crate::liquid::{bip21::DeserializeError, LiquidAddressData};

pub type InvoiceResult<T, E = InvoiceError> = Result<T, E>;

#[derive(Debug, thiserror::Error)]
Expand Down
2 changes: 2 additions & 0 deletions libs/sdk-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub mod prelude {
pub use crate::buy::moonpay::*;
pub use crate::input_parser::*;
pub use crate::invoice::*;
#[cfg(feature = "liquid")]
pub use crate::liquid::*;
pub use crate::lnurl::error::*;
pub use crate::lnurl::model::*;
pub use crate::lnurl::specs::auth::model::*;
Expand Down
3 changes: 1 addition & 2 deletions libs/sdk-common/src/liquid/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ mod tests {
use elements::AssetId;

use crate::input_parser::tests::get_bip21_rounding_test_vectors;
use crate::input_parser::*;
use crate::liquid::LiquidAddressData;
use crate::prelude::*;

#[tokio::test]
async fn test_liquid_address_bip21_rounding() -> Result<()> {
Expand Down

0 comments on commit 14715a7

Please sign in to comment.