diff --git a/background.html b/background.html
index 8757b64be..ad0d116ac 100644
--- a/background.html
+++ b/background.html
@@ -263,6 +263,9 @@
{{ waitingForRequestTitle }}
+
diff --git a/js/views/device_pairing_dialog_view.js b/js/views/device_pairing_dialog_view.js
index e9a3294d0..8724e1c6c 100644
--- a/js/views/device_pairing_dialog_view.js
+++ b/js/views/device_pairing_dialog_view.js
@@ -5,7 +5,8 @@
textsecure,
ConversationController,
$,
- lokiFileServerAPI
+ lokiFileServerAPI,
+ QRCode,
*/
// eslint-disable-next-line func-names
@@ -22,6 +23,10 @@
this.reset();
this.render();
this.showView();
+ this.qr = new QRCode(this.$('#qr')[0], {
+ correctLevel: QRCode.CorrectLevel.L,
+ });
+ this.qr.makeCode(textsecure.storage.user.getNumber());
},
reset() {
this.pubKey = null;
@@ -198,6 +203,7 @@
},
close() {
this.remove();
+ this.qr.clear();
if (this.pubKey && !this.accepted) {
this.trigger('devicePairingRequestRejected', this.pubKey);
}