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:
phillmac 2019-12-19 13:01:21 +11:00 committed by Mark Robert Henderson
parent 2101e25f26
commit 4712475c9f

View File

@ -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) {