aling handshake status with UI

This commit is contained in:
weboko 2023-01-12 01:24:21 +01:00
parent 2fdda92a82
commit 827809532a
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -98,6 +98,7 @@ function getSenderAndResponder(node) {
} }
async function confirmAuthCodeFlow(pairingObj) { async function confirmAuthCodeFlow(pairingObj) {
handshakeStatusSpan.innerHTML = "executing handshake...";
const authCode = await pairingObj.getAuthCode(); const authCode = await pairingObj.getAuthCode();
pairingObj.validateAuthCode(confirm("Confirm that authcode is: " + authCode)); pairingObj.validateAuthCode(confirm("Confirm that authcode is: " + authCode));
} }
@ -247,14 +248,14 @@ async function main() {
disableUI(); disableUI();
console.error(err); console.error(err);
} else { } else {
handshakeStatusSpan.innerHTML = "waiting for handshake to start"; handshakeStatusSpan.innerHTML = "waiting for handshake";
qrUrl.href = qrURLString; qrUrl.href = qrURLString;
qrUrl.style.display = "block"; qrUrl.style.display = "block";
} }
}); });
try { try {
handshakeStatusSpan.innerHTML = "executing handshake..."; handshakeStatusSpan.innerHTML = "waiting for handshake";
[encoder, decoder] = await pExecute; [encoder, decoder] = await pExecute;