Skip to content

Commit

Permalink
Remove extraneous check in can_register_in_v2 (#159)
Browse files Browse the repository at this point in the history
* Remove extraneous check in `can_register_in_v2`

* Use grace for `can_register_in_v2`
  • Loading branch information
BriungRi authored Sep 19, 2023
1 parent b20aa52 commit cfb0f4f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions router/sources/router.move
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ module router::router {
/// If the name is registered and active in v1, then the name can only be registered if we have burned the token (sent it to the router_signer)
/// Else, the name can only be registered if it is available in v2 (we double check availablity for safety)
inline fun can_register_in_v2(domain_name: String, subdomain_name: Option<String>): bool {
if (domains::name_is_registered(
subdomain_name,
domain_name
) && !domains::name_is_expired(subdomain_name, domain_name)) {
if (!domains::name_is_expired_past_grace(subdomain_name, domain_name)) {
let (is_burned, _token_id) = domains::is_token_owner(
router_signer_addr(),
subdomain_name,
Expand Down

0 comments on commit cfb0f4f

Please sign in to comment.