Skip to content

Commit

Permalink
allow null contenthash
Browse files Browse the repository at this point in the history
  • Loading branch information
TateB committed Dec 7, 2023
1 parent 9100d7e commit 56233f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ensjs/src/utils/generateRecordCallArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type RecordOptions = Prettify<{
/** Clears all current records */
clearRecords?: boolean
/** ContentHash value */
contentHash?: string
contentHash?: string | null
/** Array of text records */
texts?: Omit<EncodeSetTextParameters, 'namehash'>[]
/** Array of coin records */
Expand All @@ -43,7 +43,7 @@ export const generateRecordCallArray = ({
calls.push(encodeClearRecords(namehash))
}

if (typeof contentHash === 'string') {
if (contentHash !== undefined) {
const data = encodeSetContentHash({ namehash, contentHash })
if (data) calls.push(data)
}
Expand Down

0 comments on commit 56233f0

Please sign in to comment.