use steel::*;
#[derive(Debug, Error, Clone, Copy, PartialEq, Eq, IntoPrimitive)]
#[repr(u32)]
pub enum SettlementError {
#[error("Invalid token account")]
InvalidTokenAccount = 0,
#[error("Insufficient balance")]
InsufficientBalance = 1,
#[error("Fee calculation overflow")]
FeeOverflow = 2,
#[error("Invalid fee rate")]
InvalidFeeRate = 3,
#[error("Fee destination mismatch")]
FeeDestinationMismatch = 4,
#[error("The authority is invalid")]
InvalidAuthority = 5,
#[error("The authority is unchanged")]
AuthorityUnchanged = 6,
#[error("Only the authority can perform this action")]
Unauthorized = 7,
#[error("Authority transfer delay period has not elapsed")]
AuthorityTransferTooEarly = 8,
#[error("Settlement amount is zero")]
InvalidAmount = 9,
#[error("Unsupported Token-2022 mint extension")]
UnsupportedTokenExtension = 10,
}
error!(SettlementError);