Fix eslint

This commit is contained in:
morrigan
2019-11-28 17:53:27 +01:00
parent 91af449231
commit 6dc8e8288d
7 changed files with 32 additions and 32 deletions

View File

@ -45,7 +45,7 @@ export class Handshake {
}
// stage 0
async propose(earlyData?: bytes) : Promise<void> {
async propose(earlyData?: bytes): Promise<void> {
if (this.isInitiator) {
const signedPayload = signPayload(this.libp2pPrivateKey, getHandshakePayload(this.staticKeys.publicKey));
const signedEarlyDataPayload = signEarlyDataPayload(this.libp2pPrivateKey, earlyData || Buffer.alloc(0));
@ -68,7 +68,7 @@ export class Handshake {
}
// stage 1
async exchange() : Promise<void> {
async exchange(): Promise<void> {
if (this.isInitiator) {
const receivedMessageBuffer = decodeMessageBuffer((await this.connection.readLP()).slice());
const plaintext = await this.xx.recvMessage(this.session, receivedMessageBuffer);
@ -89,7 +89,7 @@ export class Handshake {
}
// stage 2
async finish() : Promise<void> {
async finish(): Promise<void> {
if (this.isInitiator) {
const messageBuffer = await this.xx.sendMessage(this.session, Buffer.alloc(0));
this.connection.writeLP(encodeMessageBuffer(messageBuffer));