Skip to content

Commit

Permalink
fix: return hashed_domain if resolver returns 0
Browse files Browse the repository at this point in the history
  • Loading branch information
irisdv committed May 27, 2024
1 parent 02d547b commit 5b3ce9e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/naming/internal.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,14 @@ impl InternalImpl of InternalTrait {
) -> (felt252, felt252) {
let (resolver, parent_start) = self.domain_to_resolver(domain, 1);
if (resolver != ContractAddressZeroable::zero()) {
(
0,
IResolverDispatcher { contract_address: resolver }
.resolve(domain.slice(0, parent_start), field, hint)
)
let resolver_res = IResolverDispatcher { contract_address: resolver }
.resolve(domain.slice(0, parent_start), field, hint);
if resolver_res == 0 {
let hashed_domain = self.hash_domain(domain);
return (0, hashed_domain);

}
return (0, resolver_res);
} else {
let hashed_domain = self.hash_domain(domain);
let domain_data = self._domain_data.read(hashed_domain);
Expand Down

0 comments on commit 5b3ce9e

Please sign in to comment.