refactor: simplify some code in MsgV3

This commit is contained in:
Andre Staltz 2023-11-13 20:44:20 +02:00
parent accc41a68c
commit 9223402335
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 7 additions and 9 deletions

View File

@ -151,7 +151,6 @@ function create(opts) {
const accountTips = opts.accountTips ? opts.accountTips.sort() : null
const tangles = /** @type {Msg['metadata']['tangles']} */ ({})
if (opts.tangles) {
for (const rootID in opts.tangles) {
if ((err = validateMsgID(rootID))) throw err
const tangle = opts.tangles[rootID]
@ -160,7 +159,6 @@ function create(opts) {
const prev = [...union(lipmaaSet, tangle.tips)].sort()
tangles[rootID] = { depth, prev }
}
}
/** @type {Msg} */
const msg = {