Skip to content

Commit

Permalink
fix: domain can't be empty typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0rgal committed May 28, 2024
1 parent f8fe076 commit 86c0820
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/naming/main.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ mod Naming {
let (hashed_domain, now, expiry) = self.assert_purchase_is_possible(id, domain, days);
// we need a u256 to be able to perform safe divisions
let domain_len = self.get_chars_len(domain.into());
assert(domain_len != 0, 'domain can\' be empty');
assert(domain_len != 0, 'domain can\'t be empty');
// find domain cost
let (erc20, price) = IPricingDispatcher {
contract_address: self._pricing_contract.read()
Expand Down Expand Up @@ -307,7 +307,7 @@ mod Naming {
let (hashed_domain, now, expiry) = self.assert_purchase_is_possible(id, domain, days);
// we need a u256 to be able to perform safe divisions
let domain_len = self.get_chars_len(domain.into());
assert(domain_len != 0, 'domain can\' be empty');
assert(domain_len != 0, 'domain can\'t be empty');

// check quote timestamp is still valid
assert(get_block_timestamp() <= max_validity, 'quotation expired');
Expand Down
1 change: 0 additions & 1 deletion src/tests/naming/test_abuses.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,3 @@ fn test_buy_empty_domain() {
naming
.buy(1, empty_domain, 365, ContractAddressZeroable::zero(), ContractAddressZeroable::zero(), 0, 0);
}

0 comments on commit 86c0820

Please sign in to comment.