File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
crates/parser/src/token_program Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ pub enum TokenProgramState {
1919impl TokenProgramState {
2020 pub fn try_unpack ( data_bytes : & [ u8 ] ) -> ParseResult < Self > {
2121 let acc = match data_bytes. len ( ) {
22- Mint :: LEN => Mint :: unpack ( data_bytes) . map ( Self :: Mint ) . map_err ( Into :: into) ,
23- Account :: LEN => Account :: unpack ( data_bytes)
22+ Mint :: LEN => Mint :: unpack_from_slice ( data_bytes) . map ( Self :: Mint ) . map_err ( Into :: into) ,
23+ Account :: LEN => Account :: unpack_from_slice ( data_bytes)
2424 . map ( Self :: TokenAccount )
2525 . map_err ( Into :: into) ,
26- Multisig :: LEN => Multisig :: unpack ( data_bytes)
26+ Multisig :: LEN => Multisig :: unpack_from_slice ( data_bytes)
2727 . map ( Self :: Multisig )
2828 . map_err ( Into :: into) ,
29- _ => Err ( ParseError :: from ( "Invalid Account data length" . to_owned ( ) ) ) ,
29+ _ => return Err ( ParseError :: Filtered )
3030 } ;
3131
3232 #[ cfg( feature = "tracing" ) ]
@@ -172,4 +172,4 @@ mod tests {
172172
173173 assert_eq ! ( mint. decimals, 10 ) ;
174174 }
175- }
175+ }
You can’t perform that action at this time.
0 commit comments