Skip to content

Commit

Permalink
remove isNullable usage
Browse files Browse the repository at this point in the history
  • Loading branch information
TateB committed Jan 7, 2024
1 parent 6b56712 commit 79a6b4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ensRegistry.ts
Expand Up @@ -109,7 +109,7 @@ function _handleNewOwner(event: NewOwnerEvent, isMigrated: boolean): void {
if (domain.name == null) {
// Get label and node names
let label = ens.nameByHash(event.params.label.toHexString());
if (!isNullable(label) && checkValidLabel(label)) {
if (label != null && checkValidLabel(label)) {
domain.labelName = label;
} else {
label = "[" + event.params.label.toHexString().slice(2) + "]";
Expand Down
2 changes: 1 addition & 1 deletion src/ethRegistrar.ts
Expand Up @@ -55,7 +55,7 @@ export function handleNameRegistered(event: NameRegisteredEvent): void {
domain.expiryDate = event.params.expires.plus(GRACE_PERIOD_SECONDS);

let labelName = ens.nameByHash(label.toHexString());
if (!isNullable(labelName) && checkValidLabel(labelName)) {
if (labelName != null && checkValidLabel(labelName)) {
domain.labelName = labelName;
domain.name = labelName! + ".eth";
registration.labelName = labelName;
Expand Down

0 comments on commit 79a6b4b

Please sign in to comment.