mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-24 08:05:02 +01:00
refactor: remove unused features
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
//! gloo wasm http Client
|
||||
|
||||
use async_trait::async_trait;
|
||||
#[cfg(feature = "nut09")]
|
||||
use cashu::nuts::nut09::{RestoreRequest, RestoreResponse};
|
||||
use cashu::nuts::{
|
||||
BlindedMessage, MeltBolt11Request, MeltBolt11Response, MintBolt11Request, MintBolt11Response,
|
||||
MintInfo, PreMintSecrets, Proof, SwapRequest, SwapResponse, *,
|
||||
BlindedMessage, CheckSpendableRequest, CheckSpendableResponse, MeltBolt11Request,
|
||||
MeltBolt11Response, MintBolt11Request, MintBolt11Response, MintInfo, PreMintSecrets, Proof,
|
||||
PublicKey, SwapRequest, SwapResponse, *,
|
||||
};
|
||||
#[cfg(feature = "nut07")]
|
||||
use cashu::nuts::{CheckSpendableRequest, CheckSpendableResponse, PublicKey};
|
||||
use cashu::{Amount, Bolt11Invoice};
|
||||
use gloo::net::http::Request;
|
||||
use serde_json::Value;
|
||||
@@ -210,7 +208,6 @@ impl Client for HttpClient {
|
||||
}
|
||||
|
||||
/// Spendable check [NUT-07]
|
||||
#[cfg(feature = "nut07")]
|
||||
async fn post_check_state(
|
||||
&self,
|
||||
mint_url: Url,
|
||||
@@ -258,7 +255,6 @@ impl Client for HttpClient {
|
||||
}
|
||||
|
||||
/// Restore [NUT-09]
|
||||
#[cfg(feature = "nut09")]
|
||||
async fn post_check_state(
|
||||
&self,
|
||||
mint_url: Url,
|
||||
|
||||
@@ -144,7 +144,6 @@ mod tests {
|
||||
use std::str::FromStr;
|
||||
|
||||
use super::*;
|
||||
#[cfg(feature = "nut11")]
|
||||
use crate::nuts::nut11::VerifyingKey;
|
||||
|
||||
#[test]
|
||||
@@ -159,7 +158,6 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "nut11")]
|
||||
fn verying_key() {
|
||||
let key_str = "026562efcfadc8e86d44da6a8adf80633d974302e62c850774db1fb36ff4cc7198";
|
||||
|
||||
|
||||
@@ -5,11 +5,7 @@
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
||||
use super::nut01::PublicKey;
|
||||
#[cfg(feature = "nut07")]
|
||||
use super::nut07;
|
||||
#[cfg(feature = "nut08")]
|
||||
use super::nut08;
|
||||
use super::{nut04, nut05};
|
||||
use super::{nut04, nut05, nut07, nut08};
|
||||
|
||||
/// Mint Version
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
@@ -81,26 +77,20 @@ pub struct Nuts {
|
||||
#[serde(default)]
|
||||
#[serde(rename = "5")]
|
||||
pub nut05: nut05::Settings,
|
||||
#[cfg(feature = "nut07")]
|
||||
#[serde(default)]
|
||||
#[serde(rename = "7")]
|
||||
pub nut07: nut07::Settings,
|
||||
#[cfg(feature = "nut08")]
|
||||
#[serde(default)]
|
||||
#[serde(rename = "8")]
|
||||
pub nut08: nut08::Settings,
|
||||
// TODO: Change to nut settings
|
||||
#[cfg(feature = "nut07")]
|
||||
#[serde(default)]
|
||||
#[serde(rename = "9")]
|
||||
pub nut09: nut07::Settings,
|
||||
// TODO: Change to nut settings
|
||||
#[cfg(feature = "nut07")]
|
||||
#[serde(default)]
|
||||
#[serde(rename = "10")]
|
||||
pub nut10: nut07::Settings,
|
||||
// TODO: Change to nut settings
|
||||
#[cfg(feature = "nut07")]
|
||||
#[serde(default)]
|
||||
#[serde(rename = "12")]
|
||||
pub nut12: nut07::Settings,
|
||||
|
||||
Reference in New Issue
Block a user