Skip to content

Commit

Permalink
return invalid error instead of None
Browse files Browse the repository at this point in the history
  • Loading branch information
davidatwhiletrue committed Apr 11, 2024
1 parent 074fb46 commit 3821723
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cep18/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ pub fn get_optional_named_arg_with_user_errors<T: FromBytes>(
) -> Option<T> {
match get_named_arg_with_user_errors::<T>(name, Cep18Error::Phantom, invalid) {
Ok(val) => Some(val),
Err(_) => None,
Err(Cep18Error::Phantom) => None,
Err(_) => runtime::revert(invalid),
}
}

Expand Down

0 comments on commit 3821723

Please sign in to comment.