SDK: update error variants in `Feature::from_account_info` (#33750)
This commit is contained in:
parent
37d093a30e
commit
6b1e9b8974
|
@ -30,9 +30,10 @@ impl Feature {
|
|||
|
||||
pub fn from_account_info(account_info: &AccountInfo) -> Result<Self, ProgramError> {
|
||||
if *account_info.owner != id() {
|
||||
return Err(ProgramError::InvalidArgument);
|
||||
return Err(ProgramError::InvalidAccountOwner);
|
||||
}
|
||||
bincode::deserialize(&account_info.data.borrow()).map_err(|_| ProgramError::InvalidArgument)
|
||||
bincode::deserialize(&account_info.data.borrow())
|
||||
.map_err(|_| ProgramError::InvalidAccountData)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue