mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-08 22:55:54 +01:00
Apply suggestions from code review
Co-authored-by: thesimplekid <tsk@thesimplekid.com>
This commit is contained in:
@@ -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")]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user