1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use anchor_lang::prelude::*;

#[error_code]
pub enum ErrorCode {
    #[msg("Token account not owned by the claim approver")]
    InvalidPaymentTokenAccount,
    #[msg("Invalid issuer")]
    InvalidIssuer,
    #[msg("Token account not owned by the issuer")]
    InvalidPayerTokenAccount,
    #[msg("Invalid token manager for this claim approver")]
    InvalidIssuerTokenAccount,
    #[msg("Invalid token manager for this claim approver")]
    InvalidTokenManager,
    #[msg("Expiration has not passed yet")]
    InvalidExpiration,
    #[msg("Invalid time invalidator")]
    InvalidTimeInvalidator,
    #[msg("Invalid instruction")]
    InvalidInstruction,
    #[msg("Max expiration exceeded")]
    InvalidExtendExpiration,
    #[msg("Invalid payment mint on time invalidator")]
    InvalidPaymentMint,
    #[msg("Invalid extension partial duration not allowed")]
    InvalidExtensionAmount,
    #[msg("Token account incorrect mint")]
    InvalidPaymentManagerTokenAccount,
    #[msg("Invalid collector")]
    InvalidCollector,
    #[msg("Account discriminator is incorrect")]
    AccountDiscriminatorMismatch,
    #[msg("Invalid token manager state for resetting expiration")]
    InvalidTokenManagerState,
    #[msg("Invalid payment manager program")]
    InvalidPaymentManagerProgram,
    #[msg("Invalid payment manager")]
    InvalidPaymentManager,
    #[msg("Invalid mint")]
    InvalidMint,
    #[msg("Invalid new max expiration")]
    InvalidNewMaxExpiration,
}