mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Allow hashes to being with 'ba'
On some occasions an ipfs address can start with `ba` ``` ipfs dag get bafyreicjqmfea2dlhcbyszyneaxcpdhlxjpsycxxaibpp4wlzfctiujxdm {"accessController":"/ipfs/zdpuAzt2GWKYeF4Pbo3hcMipCimE7SqCKZcckGduqcDJ3tmRx","name":"docstore","type":"docstore"} ipfs cid format -f "%P" bafyreicjqmfea2dlhcbyszyneaxcpdhlxjpsycxxaibpp4wlzfctiujxdm cidv1-cbor-sha2-256-32 ```
This commit is contained in:
parent
2101e25f26
commit
4712475c9f
@ -27,7 +27,7 @@ class OrbitDBAddress {
|
||||
let accessControllerHash
|
||||
|
||||
try {
|
||||
accessControllerHash = (parts[0].indexOf('zd') > -1 || parts[0].indexOf('Qm') > -1)
|
||||
accessControllerHash = (parts[0].indexOf('zd') > -1 || parts[0].indexOf('Qm') > -1 || parts[0].indexOf('ba') > -1)
|
||||
? new CID(parts[0]).toBaseEncodedString()
|
||||
: null
|
||||
} catch (e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user