Skip to content

Commit 5f5531d

Browse files
authored
fix(spl): modify program to avoid missing function issue (#138)
1 parent 6ce7407 commit 5f5531d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/src/instruction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,11 +722,11 @@ impl<'a> TokenInstruction<'a> {
722722
}
723723

724724
fn unpack_u64(input: &[u8]) -> Result<(u64, &[u8]), ProgramError> {
725-
let value = input
725+
let value_bytes: [u8; 8] = input
726726
.get(..U64_BYTES)
727727
.and_then(|slice| slice.try_into().ok())
728-
.map(u64::from_le_bytes)
729728
.ok_or(TokenError::InvalidInstruction)?;
729+
let value = u64::from_le_bytes(value_bytes);
730730
Ok((value, &input[U64_BYTES..]))
731731
}
732732

0 commit comments

Comments
 (0)