- Please verify that the pubkey shown here is your secondary device pubkey!
-
+ Please verify that the secret words shown below matches the ones on your other device!
+
@@ -270,7 +270,7 @@
{{ requestAcceptedTitle }}
Sending pairing authorisation to:
-
+
Please be patient...
diff --git a/js/views/device_pairing_dialog_view.js b/js/views/device_pairing_dialog_view.js
index 2e18ab1f4..68e1b426d 100644
--- a/js/views/device_pairing_dialog_view.js
+++ b/js/views/device_pairing_dialog_view.js
@@ -12,6 +12,7 @@
initialize() {
this.pubKeyRequests = [];
this.pubKey = null;
+ this.secretWords = null;
this.accepted = false;
this.view = '';
this.render();
@@ -64,6 +65,10 @@
nextPubKey() {
// FIFO: pop at the back of the array using pop()
this.pubKey = this.pubKeyRequests.pop();
+ this.secretWords = window.mnemonic.mn_encode(this.pubKey.slice(2), 'english')
+ .split(' ')
+ .slice(-3)
+ .join(' ');
},
showView() {
const waitingForRequestView = this.$('.waitingForRequestView');
@@ -74,7 +79,7 @@
waitingForRequestView.hide();
requestAcceptedView.show();
} else if (this.pubKey) {
- this.$('.secondaryPubKey').text(this.pubKey);
+ this.$('.secretWords').text(this.secretWords);
requestReceivedView.show();
waitingForRequestView.hide();
requestAcceptedView.hide();
diff --git a/js/views/standalone_registration_view.js b/js/views/standalone_registration_view.js
index cbf91f068..cc9489a2c 100644
--- a/js/views/standalone_registration_view.js
+++ b/js/views/standalone_registration_view.js
@@ -208,8 +208,13 @@
countDownCallBack();
this.pairingInterval = setInterval(countDownCallBack, 1000);
const pubkey = textsecure.storage.user.getNumber();
+ const words = window.mnemonic.mn_encode(pubkey.slice(2), 'english')
+ .split(' ')
+ .slice(-3)
+ .join(' ');
+
this.$('.standalone-secondary-device #pubkey').text(
- `Here is your pubkey:\n${pubkey}`
+ `Here is your secret:\n${words}`
);
} catch (e) {
onError(e);