Skip to content

Commit

Permalink
fix: update insecure connection encrypter (#1400)
Browse files Browse the repository at this point in the history
Update API to make peer id optional.
  • Loading branch information
achingbrain authored Oct 4, 2022
1 parent 6ac62da commit 12a2c75
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/delegated-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@chainsafe/libp2p-noise": "^8.0.1",
"@chainsafe/libp2p-noise": "^8.0.2",
"ipfs-core": "^0.15.4",
"libp2p": "../../",
"@libp2p/delegated-content-routing": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/libp2p-in-the-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"license": "ISC",
"dependencies": {
"@chainsafe/libp2p-noise": "^8.0.1",
"@chainsafe/libp2p-noise": "^8.0.2",
"@libp2p/bootstrap": "^2.0.1",
"@libp2p/mplex": "^5.2.3",
"@libp2p/webrtc-star": "^3.0.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/webrtc-direct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {
"@libp2p/webrtc-direct": "^2.0.0",
"@chainsafe/libp2p-noise": "^8.0.1",
"@chainsafe/libp2p-noise": "^8.0.2",
"@libp2p/bootstrap": "^2.0.1",
"@libp2p/mplex": "^5.2.3",
"libp2p": "../../",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"xsalsa20": "^1.1.0"
},
"devDependencies": {
"@chainsafe/libp2p-noise": "^8.0.1",
"@chainsafe/libp2p-noise": "^8.0.2",
"@chainsafe/libp2p-yamux": "^1.0.0",
"@libp2p/bootstrap": "^3.0.0",
"@libp2p/daemon-client": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/insecure/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class Plaintext implements ConnectionEncrypter {
return await encrypt(localId, conn, remoteId)
}

async secureOutbound (localId: PeerId, conn: Duplex<Uint8Array>, remoteId: PeerId): Promise<SecuredConnection> {
async secureOutbound (localId: PeerId, conn: Duplex<Uint8Array>, remoteId?: PeerId): Promise<SecuredConnection> {
return await encrypt(localId, conn, remoteId)
}
}

0 comments on commit 12a2c75

Please sign in to comment.