Compare commits

...

3 Commits

Author SHA1 Message Date
Jacob Karlsson e044ffb4c3 1.0.1 2024-06-01 18:28:45 +02:00
Jacob Karlsson 7de192bc32 Don't throw on missing tangle root 2024-06-01 18:28:37 +02:00
Jacob Karlsson 1ea3f32753 Ignore unnecessary type complaint 2024-04-28 00:04:07 +02:00
2 changed files with 7 additions and 3 deletions

View File

@ -394,6 +394,7 @@ function initSet(peer, config) {
const data = { add: [value], del: [], supersedes }
peer.db.feed.publish(
// @ts-ignore
{ account: loadedAccountID, domain, data },
// @ts-ignore
(err, rec) => {
@ -442,6 +443,7 @@ function initSet(peer, config) {
const data = { add: [], del: [value], supersedes }
peer.db.feed.publish(
// @ts-ignore
{ account: loadedAccountID, domain, data },
// @ts-ignore
(err, rec) => {
@ -510,6 +512,7 @@ function initSet(peer, config) {
// prettier-ignore
if (!tangle) return cb(null, 0)
if (!tangle.root) return cb(null, 0)
// prettier-ignore
if (!MsgV4.isMoot(tangle.root)) return cb(Error(`Tangle "${tangleID}" is not a moot`))
const domain = tangle.root.metadata.domain
@ -637,6 +640,7 @@ function initSet(peer, config) {
const data = { add: [...currentSet], del: [], supersedes }
peer.db.feed.publish(
// @ts-ignore
{ account: loadedAccountID, domain, data },
// @ts-ignore
(err, rec) => {

View File

@ -1,6 +1,6 @@
{
"name": "pzp-set",
"version": "1.0.0",
"version": "1.0.1",
"description": "Set data structure over append-only logs with pruning",
"author": "Andre Staltz <contact@staltz.com>",
"license": "MIT",
@ -32,12 +32,12 @@
"@types/pull-stream": "^3.6.7",
"bs58": "^5.0.0",
"c8": "7",
"pzp-db": "^1.0.1",
"pzp-caps": "^1.0.0",
"pzp-db": "^1.0.3",
"pzp-keypair": "^1.0.0",
"rimraf": "^4.4.0",
"secret-stack": "~8.1.0",
"secret-handshake-ext": "0.0.10",
"secret-stack": "~8.1.0",
"ssb-box": "^1.0.1",
"typescript": "^5.1.3"
},