Skip to content

Commit 67d0ad4

Browse files
authored
fix: ipns validate should return void (#118)
BREAKING CHANGE: ipns validate function returns a void promise instead of boolean promise
1 parent 225935a commit 67d0ad4

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ const validator = {
351351

352352
// Record validation
353353
await validate(pubKey, receivedEntry)
354-
return true
355354
},
356355
/**
357356
* @param {Uint8Array} dataA

test/index.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ describe('ipns', function () {
219219
const marshalledData = ipns.marshal(entry)
220220
const key = uint8ArrayFromString(`/ipns/${ipfsId.id}`)
221221

222-
const valid = await ipns.validator.validate(marshalledData, key)
223-
expect(valid).to.equal(true)
222+
await ipns.validator.validate(marshalledData, key)
224223
})
225224

226225
it('should use validator.validate to verify that a record is not valid', async () => {

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"outDir": "dist"
55
},
66
"include": [
7-
"test",
87
"src"
98
],
109
"exclude": [
11-
"src/pb/ipns.js"
10+
"src/pb/ipns.js",
11+
"test"
1212
]
1313
}

0 commit comments

Comments
 (0)