Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Sep 10, 2019
1 parent 59a08c5 commit 4cbcf38
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/handshake/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const finish = require('./finish')
// Performs initial communication over insecure channel to share keys, IDs,
// and initiate communication, assigning all necessary params.
module.exports = function handshake (state) {
const {awaitConnected} = state
const { awaitConnected } = state

const main = async () => {
await propose(state)
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
const timeout = 60 * 1000 * 5
const state = new State(localId, remoteId, timeout)

const {handler, awaitConnected} = handshake(state)
const { handler, awaitConnected } = handshake(state)

const encryptedConnection = new Connection(undefined, conn)
encryptedConnection.awaitConnected = (async () => { // NOTE: all errors this throws should ideally be also sent down the wire of the connection
Expand Down
2 changes: 1 addition & 1 deletion src/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const defer = (timeout) => {
d()
}

let prom = new Promise((resolve, reject) => {
const prom = new Promise((resolve, reject) => {
_resolve = resolve
_reject = reject
})
Expand Down
4 changes: 2 additions & 2 deletions src/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ exports.theBest = (order, p1, p2) => {
return p1[0]
}

for (let firstCandidate of first) {
for (let secondCandidate of second) {
for (const firstCandidate of first) {
for (const secondCandidate of second) {
if (firstCandidate === secondCandidate) {
return firstCandidate
}
Expand Down
4 changes: 2 additions & 2 deletions test/secio.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ describe('secio', () => {
const p = pair()

// we are using peerC Id on purpose to fail
const {awaitConnected: prom1} = secio.encrypt(peerA, new Connection(p[0]), peerC)
const {awaitConnected: prom2} = secio.encrypt(peerB, new Connection(p[1]), peerA)
const { awaitConnected: prom1 } = secio.encrypt(peerA, new Connection(p[0]), peerC)
const { awaitConnected: prom2 } = secio.encrypt(peerB, new Connection(p[1]), peerA)

const errs = await Promise.all([prom1, prom2].map(catcher))
expect(errs.filter(Boolean).length).to.equal(2)
Expand Down

0 comments on commit 4cbcf38

Please sign in to comment.