From 6f7216903aabcc839ac5fba13d62e60a78868d80 Mon Sep 17 00:00:00 2001 From: LimpidCrypto Date: Wed, 20 Nov 2024 16:33:58 +0000 Subject: [PATCH] fix core build --- src/utils/exceptions.rs | 5 ++++- src/utils/mod.rs | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/exceptions.rs b/src/utils/exceptions.rs index ca6923e..776265e 100644 --- a/src/utils/exceptions.rs +++ b/src/utils/exceptions.rs @@ -3,7 +3,9 @@ use alloc::string::String; use thiserror_no_std::Error; -use crate::{core::exceptions::XRPLCoreException, models::XRPLModelException, XRPLSerdeJsonError}; +#[cfg(feature = "models")] +use crate::models::XRPLModelException; +use crate::{core::exceptions::XRPLCoreException, XRPLSerdeJsonError}; pub type XRPLUtilsResult = core::result::Result; @@ -18,6 +20,7 @@ pub enum XRPLUtilsException { XRPLNFTIdError(#[from] XRPLNFTIdException), #[error("XRPL Core error: {0}")] XRPLCoreError(#[from] XRPLCoreException), + #[cfg(feature = "models")] #[error("XRPL Model error: {0}")] XRPLModelError(#[from] XRPLModelException), #[error("ISO Code error: {0}")] diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 0251fde..a63283e 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -1,7 +1,9 @@ //! Convenience utilities for the XRP Ledger pub mod exceptions; +#[cfg(feature = "models")] pub mod get_nftoken_id; +#[cfg(feature = "models")] pub mod parse_nftoken_id; pub mod time_conversion; #[cfg(feature = "models")]