Closed fazo96 closed 6 years ago
Unfortunately this way of getting the peer ID https://github.com/haadcode/ipfs-pubsub-1on1/blob/master/src/get-peer-id.js#L4 does not play well with IPFS API.
The correct way would be (await ipfs.id()).id but unfortunately it's an async operation, and getPeerID is called from a constructor!
(await ipfs.id()).id
getPeerID
I'll see if I can find a good way to fix it
Thanks for fixing this @fazo96! ❤️The fix is now released in the latest version 0.0.4.
Merged to master in OrbitDB too https://github.com/orbitdb/orbit-db/pull/359
Unfortunately this way of getting the peer ID https://github.com/haadcode/ipfs-pubsub-1on1/blob/master/src/get-peer-id.js#L4 does not play well with IPFS API.
The correct way would be
(await ipfs.id()).id
but unfortunately it's an async operation, andgetPeerID
is called from a constructor!I'll see if I can find a good way to fix it