Răsfoiți Sursa

chore: nut17 import oordering

thesimplekid 4 luni în urmă
părinte
comite
4e2c013c79

+ 8 - 6
crates/cdk/src/nuts/nut17/mod.rs

@@ -1,8 +1,13 @@
 //! Specific Subscription for the cdk crate
 
-use super::{BlindSignature, CurrencyUnit, PaymentMethod};
+use std::{ops::Deref, sync::Arc};
+
+use serde::{Deserialize, Serialize};
+
+mod on_subscription;
+
 use crate::cdk_database::{self, MintDatabase};
-pub use crate::pub_sub::SubId;
+use crate::nuts::{BlindSignature, CurrencyUnit, PaymentMethod};
 use crate::{
     nuts::{
         MeltQuoteBolt11Response, MeltQuoteState, MintQuoteBolt11Response, MintQuoteState,
@@ -10,11 +15,8 @@ use crate::{
     },
     pub_sub::{self, Index, Indexable, SubscriptionGlobalId},
 };
-use serde::{Deserialize, Serialize};
-use std::{ops::Deref, sync::Arc};
-
-mod on_subscription;
 
+pub use crate::pub_sub::SubId;
 pub use on_subscription::OnSubscription;
 
 /// Subscription Parameter according to the standard

+ 2 - 1
crates/cdk/src/nuts/nut17/on_subscription.rs

@@ -1,13 +1,14 @@
 //! On Subscription
 //!
 //! This module contains the code that is triggered when a new subscription is created.
+use std::{collections::HashMap, sync::Arc};
+
 use super::{Kind, NotificationPayload};
 use crate::{
     cdk_database::{self, MintDatabase},
     nuts::{MeltQuoteBolt11Response, MintQuoteBolt11Response, ProofState, PublicKey},
     pub_sub::OnNewSubscription,
 };
-use std::{collections::HashMap, sync::Arc};
 
 #[derive(Default)]
 /// Subscription Init