Product Message + Message Info

This commit is contained in:
Adhiraj
2020-07-12 18:47:20 +05:30
parent 7e9c9881d1
commit 40df8f5d00
5 changed files with 66 additions and 21 deletions

View File

@@ -40,8 +40,14 @@ const list = wsMessages.map ((item, i) => {
const [tag, json, binaryTags] = decrypt (buffer)
return {tag, json: JSON.stringify(json), binaryTags}
} catch (error) {
console.error (`received error in decoding ${i}: ${error}`)
return null
try {
const [tag, json, binaryTags] = decrypt (item.data)
return {tag, json: JSON.stringify(json), binaryTags}
} catch (error) {
console.log ('error in decoding: ' + error)
return null
}
}
})
const str = JSON.stringify (list, null, '\t')