Fix missing awaits!

pull/430/head
sachaaaaa 6 years ago
parent 6ab05e28df
commit c7dc79e7f9

@ -1094,17 +1094,19 @@ MessageReceiver.prototype.extend({
return true;
},
async handlePairingRequest(pairingRequest) {
if (!this.validateAuthorisation(pairingRequest)) {
const valid = await this.validateAuthorisation(pairingRequest);
if (!valid) {
return;
}
window.libloki.storage.savePairingAuthorisation(pairingRequest);
await window.libloki.storage.savePairingAuthorisation(pairingRequest);
Whisper.events.trigger(
'devicePairingRequestReceived',
pairingRequest.secondaryDevicePubKey
);
},
async handleAuthorisationForSelf(pairingAuthorisation) {
if (!this.validateAuthorisation(pairingAuthorisation)) {
const valid = await this.validateAuthorisation(pairingAuthorisation);
if (!valid) {
return;
}
const { type, primaryDevicePubKey } = pairingAuthorisation;
@ -1132,7 +1134,8 @@ MessageReceiver.prototype.extend({
}
},
async handleAuthorisationForContact(pairingAuthorisation) {
if (!this.validateAuthorisation(pairingAuthorisation)) {
const valid = this.validateAuthorisation(pairingAuthorisation);
if (!valid) {
return;
}
const { primaryDevicePubKey, secondaryDevicePubKey } = pairingAuthorisation;

Loading…
Cancel
Save