Skip to content

Commit

Permalink
fix: keys is a standard interface-datastore (#156)
Browse files Browse the repository at this point in the history
* fix: keys is a standard interface-datastore

copy and paste error

* test: keystore is a interface-datastore
  • Loading branch information
richardschneider authored and daviddias committed Dec 11, 2017
1 parent a55b937 commit d99f3c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 1 addition & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,7 @@ class IpfsRepo {
},
(cb) => {
log('creating keystore')
const keysBaseStore = backends.create('keys', path.join(this.path, 'keys'), this.options)
blockstore(
keysBaseStore,
this.options.storageBackendOptions.keys,
cb)
},
(keys, cb) => {
this.keys = keys
this.keys = backends.create('keys', path.join(this.path, 'keys'), this.options)
cb()
},

Expand Down
5 changes: 5 additions & 0 deletions test/keystore-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ module.exports = (repo) => {
it('exists', () => {
expect(repo).to.have.property('keys')
})
it('implements interface-datastore', () => {
const keys = repo.keys
expect(keys.batch).to.exist()
expect(keys.query).to.exist()
})
})
}

0 comments on commit d99f3c4

Please sign in to comment.