Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
refactor: fixes ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajpiar committed May 14, 2020
1 parent 6e72da1 commit b3387a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/rns/hooks/domain-offer.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default {
[Op.like]: `%${$like}%`
},
tokenId: {
[Op.eq]: numberToHex((sha3($like)))
[Op.eq]: numberToHex(((sha3($like)) as string))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/rns/hooks/domain.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {
)
${isOwned ? `AND "active_offers"."tokenId" IS NULL
AND ("INACTIVE_OFFERS"."tokenId" IS NOT NULL OR "offers"."tokenId" IS NULL)` : ''}
${nameFilter?.$like ? `AND "Domain"."name" LIKE '%${nameFilter.$like}%' OR "Domain"."tokenId" = '${numberToHex(sha3(nameFilter.$like))}'` : ''}
${nameFilter?.$like ? `AND ("Domain"."name" LIKE '%${nameFilter.$like}%' OR "Domain"."tokenId" = '${numberToHex((sha3(nameFilter.$like)) as string)}')` : ''}
`

const sequelize = context.app.get('sequelize')
Expand Down
5 changes: 3 additions & 2 deletions src/rns/hooks/sold-domain.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ export default {
[Op.like]: `%${$like}%`
},
tokenId: {
[Op.eq]: numberToHex((sha3($like)))
[Op.eq]: numberToHex(((sha3($like)) as string))
}
}
}
}

delete (context.params.query as any).domain
}],
}
],
get: [],
create: disallow(),
update: disallow(),
Expand Down

0 comments on commit b3387a5

Please sign in to comment.