refactor(cdk-redb): feature gate mint and wallet

This commit is contained in:
thesimplekid
2024-04-14 23:17:33 +01:00
parent 2eca18007d
commit 15a25a4f3d
6 changed files with 16 additions and 6 deletions

View File

@@ -1,2 +1,2 @@
[language-server.rust-analyzer.config]
cargo = { features = [ "wallet", "mint", "redb" ] }
cargo = { features = [ "wallet", "mint", "redb", "all-nuts" ] }

View File

@@ -8,10 +8,14 @@ repository.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["mint", "wallet"]
mint = ["cdk/mint"]
wallet = ["cdk/wallet"]
[dependencies]
async-trait.workspace = true
cdk.workspace = true
cdk = { workspace = true, default-features = false }
redb = "2.0.0"
tokio.workspace = true
thiserror.workspace = true

View File

@@ -1,5 +1,9 @@
pub mod mint_redb;
pub mod wallet_redb;
#[cfg(feature = "mint")]
pub mod mint;
#[cfg(feature = "wallet")]
pub mod wallet;
pub use mint_redb::MintRedbDatabase;
pub use wallet_redb::RedbWalletDatabase;
#[cfg(feature = "mint")]
pub use mint::MintRedbDatabase;
#[cfg(feature = "wallet")]
pub use wallet::RedbWalletDatabase;

View File

@@ -13,7 +13,9 @@ use crate::secret::Secret;
use crate::types::{MeltQuote, MintQuote};
use crate::url::UncheckedUrl;
#[cfg(feature = "mint")]
pub mod mint_memory;
#[cfg(feature = "wallet")]
pub mod wallet_memory;
#[derive(Debug, Error)]