This commit is contained in:
haad 2023-04-13 08:26:41 +03:00
parent e687b51d96
commit b1d16fc7b4
3 changed files with 4 additions and 3 deletions

View File

@ -22,6 +22,7 @@ const addDatabaseType = (type, store) => {
databaseTypes[type] = store
}
const DefaultDatabaseType = 'events'
const DefaultAccessController = IPFSAccessController
const OrbitDB = async ({ ipfs, id, identity, keystore, directory } = {}) => {
@ -64,7 +65,7 @@ const OrbitDB = async ({ ipfs, id, identity, keystore, directory } = {}) => {
meta = manifest.meta
} else {
// If the address given was not valid, eg. just the name of the database
type = type || 'events'
type = type || DefaultDatabaseType
AccessController = AccessController || DefaultAccessController()
accessController = await AccessController({ orbitdb: { open, identity, ipfs }, identities })
const m = await manifests.create({ name: address, type, accessController: accessController.address, meta })

View File

@ -65,7 +65,7 @@ describe('Identities', function () {
})
})
describe.skip('Passing in custom keystore', async () => {
describe('Passing in custom keystore', async () => {
const id = 'userB'
let identity

View File

@ -7,7 +7,7 @@ import connectPeers from './utils/connect-nodes.js'
import waitFor from './utils/wait-for.js'
describe('Replicating databases', function () {
this.timeout(60000)
this.timeout(30000)
let ipfs1, ipfs2
let orbitdb1, orbitdb2