Skip to content

Commit

Permalink
feat: bonus-name must be atleast 5 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
realnimish committed Jul 30, 2024
1 parent ab64a72 commit 671d233
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/azns_registry/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ mod azns_registry {
}

let name = name.unwrap();
if !self.is_name_allowed(&name) {
if !self.is_name_allowed(&name) || name.len() < 5 {
return Err(Error::NameNotAllowed);
}
// The name must not be a reserved name
Expand Down Expand Up @@ -3448,7 +3448,7 @@ mod tests {
);

// Reserved names cannot be redeemed as bonus
let reserved_name = String::from("bob");
let reserved_name = String::from("bobby");
let reserved_list = vec![(reserved_name.clone(), None)];
contract
.add_reserved_names(reserved_list, false)
Expand Down

0 comments on commit 671d233

Please sign in to comment.