Apply suggestions from code review

Co-authored-by: thesimplekid <tsk@thesimplekid.com>
This commit is contained in:
C
2025-04-22 09:30:21 -04:00
committed by GitHub
parent 81a6d68ef3
commit 5505f0b5d7
2 changed files with 2 additions and 1 deletions

View File

@@ -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")]

View File

@@ -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