diff --git a/crates/cdk-common/src/lib.rs b/crates/cdk-common/src/lib.rs index e0732165..3dec0a8d 100644 --- a/crates/cdk-common/src/lib.rs +++ b/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")] diff --git a/crates/cdk-common/src/state.rs b/crates/cdk-common/src/state.rs index 3c0ac6fb..4833ec04 100644 --- a/crates/cdk-common/src/state.rs +++ b/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