diff --git a/sdk/src/instruction.rs b/sdk/src/instruction.rs index cb95c1f45..247dc17d4 100644 --- a/sdk/src/instruction.rs +++ b/sdk/src/instruction.rs @@ -98,7 +98,7 @@ pub enum InstructionError { impl InstructionError { pub fn new_result_with_negative_lamports() -> Self { - InstructionError::CustomError(SystemError::ResultWithNegativeLamports as u32) + SystemError::ResultWithNegativeLamports.into() } }