Skip to content

Commit

Permalink
use _id
Browse files Browse the repository at this point in the history
  • Loading branch information
TateB committed Jul 18, 2023
1 parent c4923a5 commit 6782604
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ensRegistry.ts
@@ -1,5 +1,5 @@
// Import types and APIs from graph-ts
import { BigInt, crypto, ens, store } from "@graphprotocol/graph-ts";
import { BigInt, crypto, ens, log, store } from "@graphprotocol/graph-ts";

import {
concat,
Expand Down Expand Up @@ -130,7 +130,11 @@ function _handleNewOwner(event: NewOwnerEvent, isMigrated: boolean): void {
}

// this is effectively an unwrap event UNLESS it's a namewrapper upgrade, but the namewrapper events should handle that situation
if (domain.wrappedDomain.isSet("id")) {
log.warning("domain: {}, wrappedDomain: {}", [
domain.id,
domain.wrappedDomain._id,
]);
if (domain.wrappedDomain._id) {
domain.wrappedOwner = null;
if (domain.expiryDate && domain.parent !== ETH_NODE) {
domain.expiryDate = null;
Expand Down

0 comments on commit 6782604

Please sign in to comment.