mirror of https://github.com/waku-org/js-noise.git
Merge pull request #54 from EmilIvanichkovv/fix-logging-in-pairing-module
Fix logging in pairing module
This commit is contained in:
commit
dc9b7974bb
|
@ -106,8 +106,6 @@ export class WakuPairing {
|
||||||
this.myEphemeralKey = NoiseHandshakePatterns.Noise_WakuPairing_25519_ChaChaPoly_SHA256.dhKey.generateKeyPair();
|
this.myEphemeralKey = NoiseHandshakePatterns.Noise_WakuPairing_25519_ChaChaPoly_SHA256.dhKey.generateKeyPair();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(this.myEphemeralKey.publicKey);
|
|
||||||
|
|
||||||
if (pairingParameters instanceof InitiatorParameters) {
|
if (pairingParameters instanceof InitiatorParameters) {
|
||||||
this.initiator = true;
|
this.initiator = true;
|
||||||
this.qr = QR.from(pairingParameters.qrCode);
|
this.qr = QR.from(pairingParameters.qrCode);
|
||||||
|
@ -249,7 +247,7 @@ export class WakuPairing {
|
||||||
const confirmationPromise = this.isAuthCodeConfirmed();
|
const confirmationPromise = this.isAuthCodeConfirmed();
|
||||||
await delay(100);
|
await delay(100);
|
||||||
this.eventEmitter.emit("authCodeGenerated", this.handshake.genAuthcode());
|
this.eventEmitter.emit("authCodeGenerated", this.handshake.genAuthcode());
|
||||||
console.log("Waiting for authcode confirmation...");
|
log("Waiting for authcode confirmation...");
|
||||||
const confirmed = await confirmationPromise;
|
const confirmed = await confirmationPromise;
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
throw new Error("authcode is not confirmed");
|
throw new Error("authcode is not confirmed");
|
||||||
|
@ -311,7 +309,7 @@ export class WakuPairing {
|
||||||
const confirmationPromise = this.isAuthCodeConfirmed();
|
const confirmationPromise = this.isAuthCodeConfirmed();
|
||||||
await delay(100);
|
await delay(100);
|
||||||
this.eventEmitter.emit("authCodeGenerated", this.handshake.genAuthcode());
|
this.eventEmitter.emit("authCodeGenerated", this.handshake.genAuthcode());
|
||||||
console.log("Waiting for authcode confirmation...");
|
log("Waiting for authcode confirmation...");
|
||||||
const confirmed = await confirmationPromise;
|
const confirmed = await confirmationPromise;
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
throw new Error("authcode is not confirmed");
|
throw new Error("authcode is not confirmed");
|
||||||
|
|
Loading…
Reference in New Issue