There was an error while loading. Please reload this page.
1 parent 64bd461 commit fda718eCopy full SHA for fda718e
1 file changed
program-libs/token-interface/src/state/token/borsh.rs
@@ -135,8 +135,10 @@ impl AnchorDeserialize for Token {
135
Option::<Vec<ExtensionStruct>>::deserialize_reader(buf).unwrap_or_default();
136
(account_type, extensions)
137
} else {
138
- // Account type byte present but not Token - store it but no extensions
139
- (account_type, None)
+ return Err(std::io::Error::new(
+ std::io::ErrorKind::InvalidData,
140
+ "Account type does not match Token account",
141
+ ));
142
}
143
144
// No account_type byte - base SPL token account without extensions
0 commit comments