helia-coord 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -66,7 +66,8 @@ class IpfsAdapter {
|
|
|
66
66
|
|
|
67
67
|
// Get multiaddrs that can be used to connect to this node.
|
|
68
68
|
// const addrs = id2.addresses.map(elem => elem.toString())
|
|
69
|
-
|
|
69
|
+
let addrs = this.ipfs.libp2p.getMultiaddrs()
|
|
70
|
+
addrs = addrs.map(elem => elem.toString())
|
|
70
71
|
// this.state.ipfsMultiaddrs = addrs
|
|
71
72
|
this.ipfsMultiaddrs = addrs
|
|
72
73
|
|
|
@@ -107,9 +107,8 @@ class TimerControllers {
|
|
|
107
107
|
async listPubsubChannels () {
|
|
108
108
|
const ipfs = this.adapters.ipfs.ipfs
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
console.log(`subscribed pubsub channels: ${JSON.stringify(pubsubChans, null, 2)}`)
|
|
110
|
+
const pubsubChans = ipfs.libp2p.services.pubsub.getTopics()
|
|
111
|
+
// console.log(`subscribed pubsub channels: ${JSON.stringify(pubsubChans, null, 2)}`)
|
|
113
112
|
this.adapters.log.statusLog(2, `subscribed pubsub channels: ${JSON.stringify(pubsubChans, null, 2)}`)
|
|
114
113
|
|
|
115
114
|
return true
|
package/package.json
CHANGED
package/test/mocks/ipfs-mock.js
CHANGED
|
@@ -29,9 +29,9 @@ const ipfs = {
|
|
|
29
29
|
peerId: {
|
|
30
30
|
toString: () => 'fake-peerId'
|
|
31
31
|
},
|
|
32
|
-
getMultiaddrs: () => [],
|
|
32
|
+
getMultiaddrs: () => ['a', 'b'],
|
|
33
33
|
dial: async () => {},
|
|
34
|
-
getPeers: async () => [],
|
|
34
|
+
getPeers: async () => ['a', 'b'],
|
|
35
35
|
services: {
|
|
36
36
|
pubsub: {
|
|
37
37
|
publish: async () => {},
|