Skip to content

Commit

Permalink
fix: update interfaces (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain authored Mar 24, 2022
1 parent d0554a6 commit f494708
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"release": "semantic-release"
},
"dependencies": {
"@libp2p/interfaces": "^1.3.14",
"@libp2p/interfaces": "^1.3.18",
"@libp2p/logger": "^1.1.2",
"@multiformats/multiaddr": "^10.1.7",
"err-code": "^3.0.1",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { IPFSHTTPClient } from 'ipfs-http-client'
import type { HTTPClientExtraOptions } from 'ipfs-http-client/types/src/types'
import type { AbortOptions } from 'ipfs-core-types/src/utils'
import type { PeerRouting } from '@libp2p/interfaces/peer-routing'
import type { PeerData } from '@libp2p/interfaces/peer-data'
import type { PeerInfo } from '@libp2p/interfaces/peer-info'

const log = logger('libp2p-delegated-peer-routing')

Expand Down Expand Up @@ -68,13 +68,13 @@ export class DelegatedPeerRouting implements PeerRouting {
timeout: options.timeout
})) {
if (event.name === 'FINAL_PEER') {
const peerData: PeerData = {
const peerInfo: PeerInfo = {
id: peerIdFromString(event.peer.id),
multiaddrs: event.peer.multiaddrs.map(ma => new Multiaddr(ma.toString())),
protocols: []
}

return peerData
return peerInfo
}
}
} catch (err: any) {
Expand Down

0 comments on commit f494708

Please sign in to comment.