refactor isMoot()

This commit is contained in:
Andre Staltz 2024-01-05 14:18:19 +02:00
parent cc1f83c064
commit 001fcaa1ab
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
2 changed files with 3 additions and 2 deletions

View File

@ -13,9 +13,10 @@ const { isEmptyObject } = require('./util')
function isMoot(msg, id = 0, findDomain = 0) {
const { dataHash, dataSize, account, accountTips, tangles, domain } =
msg.metadata
if (msg.data !== null) return false
if (dataHash !== null) return false
if (dataSize !== 0) return false
if (id === 0 && !account) return false
if (account === 'self') return false
if (id !== 0 && account !== stripAccount(id)) return false
if (accountTips !== null) return false
if (!isEmptyObject(tangles)) return false

View File

@ -11,6 +11,6 @@
"module": "node16",
"skipLibCheck": true,
"strict": true,
"target": "es2021"
"target": "es2022"
}
}