mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-07 14:46:37 +00:00
use new cid package
This commit is contained in:
parent
0f7ceed675
commit
be4f31d25a
@ -17,11 +17,11 @@
|
|||||||
],
|
],
|
||||||
"main": "src/OrbitDB.js",
|
"main": "src/OrbitDB.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cids": "^1.0.0",
|
|
||||||
"ipfs-pubsub-1on1": "~0.0.6",
|
"ipfs-pubsub-1on1": "~0.0.6",
|
||||||
"is-node": "^1.0.2",
|
"is-node": "^1.0.2",
|
||||||
"localstorage-down": "^0.6.7",
|
"localstorage-down": "^0.6.7",
|
||||||
"logplease": "^1.2.14",
|
"logplease": "^1.2.14",
|
||||||
|
"multiformats": "^9.4.7",
|
||||||
"multihashes": "~3.0.1",
|
"multihashes": "~3.0.1",
|
||||||
"orbit-db-access-controllers": "github:tabcat/orbit-db-access-controllers#upgrade-ipfs",
|
"orbit-db-access-controllers": "github:tabcat/orbit-db-access-controllers#upgrade-ipfs",
|
||||||
"orbit-db-cache": "~0.3.0",
|
"orbit-db-cache": "~0.3.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const CID = require('cids')
|
const { CID } = require('multiformats/cid')
|
||||||
|
|
||||||
const notEmpty = e => e !== '' && e !== ' '
|
const notEmpty = e => e !== '' && e !== ' '
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ class OrbitDBAddress {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
accessControllerHash = validateHash(parts[0])
|
accessControllerHash = validateHash(parts[0])
|
||||||
? new CID(parts[0]).toBaseEncodedString()
|
? CID.parse(parts[0]).toString()
|
||||||
: null
|
: null
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user