From 001fcaa1ab20754e24c665d5c529aa054432be34 Mon Sep 17 00:00:00 2001 From: Andre Staltz Date: Fri, 5 Jan 2024 14:18:19 +0200 Subject: [PATCH] refactor isMoot() --- lib/msg-v4/is-moot.js | 3 ++- tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/msg-v4/is-moot.js b/lib/msg-v4/is-moot.js index 286a787..2146192 100644 --- a/lib/msg-v4/is-moot.js +++ b/lib/msg-v4/is-moot.js @@ -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 diff --git a/tsconfig.json b/tsconfig.json index bd2acd5..cc6e7af 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,6 @@ "module": "node16", "skipLibCheck": true, "strict": true, - "target": "es2021" + "target": "es2022" } } \ No newline at end of file