Bläddra i källkod

Apply suggestions from code review

Co-authored-by: thesimplekid <tsk@thesimplekid.com>
C 4 dagar sedan
förälder
incheckning
5505f0b5d7
2 ändrade filer med 2 tillägg och 1 borttagningar
  1. 1 0
      crates/cdk-common/src/lib.rs
  2. 1 1
      crates/cdk-common/src/state.rs

+ 1 - 0
crates/cdk-common/src/lib.rs

@@ -16,6 +16,7 @@ pub mod mint;
 #[cfg(feature = "mint")]
 pub mod payment;
 pub mod pub_sub;
+#[cfg(feature = "mint")]
 pub mod state;
 pub mod subscription;
 #[cfg(feature = "wallet")]

+ 1 - 1
crates/cdk-common/src/state.rs

@@ -22,7 +22,7 @@ pub fn check_state_transition(current_state: State, new_state: State) -> Result<
     let is_valid_transition = match current_state {
         State::Unspent => matches!(
             new_state,
-            State::Pending | State::Reserved | State::PendingSpent | State::Spent
+            State::Pending | State::Spent
         ),
         State::Pending => matches!(new_state, State::Unspent | State::Spent),
         // Any other state shouldn't be updated by the mint, and the wallet does not use this