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("Settlement amount is zero")]
InvalidAmount = 8,
}
error!(SettlementError);