retain v2 error values

This commit is contained in:
Jack May 2020-09-21 14:49:34 -07:00
parent 08841b801e
commit 15aa02760a
2 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,9 @@ pub enum TokenError {
/// Invalid number of required signers.
#[error("Invalid number of required signers")]
InvalidNumberOfRequiredSigners,
/// State is uninitialized.
#[error("State is unititialized")]
UninitializedState,
/// Instruction does not support native tokens
#[error("Instruction does not support native tokens")]
NativeNotSupported,

View File

@ -758,6 +758,7 @@ impl PrintProgramError for TokenError {
TokenError::InvalidNumberOfRequiredSigners => {
info!("Error: Invalid number of required signers")
}
TokenError::UninitializedState => info!("Error: State is uninitialized"),
TokenError::NativeNotSupported => {
info!("Error: Instruction does not support native tokens")
}