use new cid package

This commit is contained in:
tabcat 2021-09-05 16:21:58 -05:00
parent 0f7ceed675
commit be4f31d25a
2 changed files with 3 additions and 3 deletions

View File

@ -17,11 +17,11 @@
],
"main": "src/OrbitDB.js",
"dependencies": {
"cids": "^1.0.0",
"ipfs-pubsub-1on1": "~0.0.6",
"is-node": "^1.0.2",
"localstorage-down": "^0.6.7",
"logplease": "^1.2.14",
"multiformats": "^9.4.7",
"multihashes": "~3.0.1",
"orbit-db-access-controllers": "github:tabcat/orbit-db-access-controllers#upgrade-ipfs",
"orbit-db-cache": "~0.3.0",

View File

@ -1,6 +1,6 @@
'use strict'
const path = require('path')
const CID = require('cids')
const { CID } = require('multiformats/cid')
const notEmpty = e => e !== '' && e !== ' '
@ -38,7 +38,7 @@ class OrbitDBAddress {
try {
accessControllerHash = validateHash(parts[0])
? new CID(parts[0]).toBaseEncodedString()
? CID.parse(parts[0]).toString()
: null
} catch (e) {
return false