From 851ffe1396e3d1e8bdffc99cb4cee5588176407e Mon Sep 17 00:00:00 2001 From: viktr Date: Thu, 25 Dec 2025 12:39:43 +0100 Subject: [PATCH 1/2] Fix: include UnwrapLamports (45) in TokenInstruction::try_from --- pinocchio/interface/src/instruction.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pinocchio/interface/src/instruction.rs b/pinocchio/interface/src/instruction.rs index 749dd65e..0c5f9b47 100644 --- a/pinocchio/interface/src/instruction.rs +++ b/pinocchio/interface/src/instruction.rs @@ -547,7 +547,7 @@ impl TryFrom for TokenInstruction { fn try_from(value: u8) -> Result { match value { // SAFETY: `value` is guaranteed to be in the range of the enum variants. - 0..=24 | 38 | 255 => Ok(unsafe { core::mem::transmute::(value) }), + 0..=24 | 38 | 45 | 255 => Ok(unsafe { core::mem::transmute::(value) }), _ => Err(TokenError::InvalidInstruction.into()), } } @@ -599,7 +599,7 @@ mod tests { assert_eq!(TokenInstruction::try_from(variant_u8).unwrap(), variant); } } - + #[test] fn test_authority_type_from_u8_exhaustive() { for variant in AuthorityType::iter() { @@ -611,4 +611,4 @@ mod tests { assert_eq!(AuthorityType::try_from(variant_u8).unwrap(), variant); } } -} +} \ No newline at end of file From 87e83b961bea69a9b1b0e7e82348145bfe253b81 Mon Sep 17 00:00:00 2001 From: Fernando Otero Date: Thu, 8 Jan 2026 19:31:05 +0000 Subject: [PATCH 2/2] Remove extra spaces --- pinocchio/interface/src/instruction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pinocchio/interface/src/instruction.rs b/pinocchio/interface/src/instruction.rs index 0c5f9b47..476c99fa 100644 --- a/pinocchio/interface/src/instruction.rs +++ b/pinocchio/interface/src/instruction.rs @@ -599,7 +599,7 @@ mod tests { assert_eq!(TokenInstruction::try_from(variant_u8).unwrap(), variant); } } - + #[test] fn test_authority_type_from_u8_exhaustive() { for variant in AuthorityType::iter() { @@ -611,4 +611,4 @@ mod tests { assert_eq!(AuthorityType::try_from(variant_u8).unwrap(), variant); } } -} \ No newline at end of file +}