return to Approve screen after cancelling unlock during request approval

This commit is contained in:
2024-02-07 13:03:12 -08:00
parent 87617a0726
commit 64a2927b94
8 changed files with 14 additions and 13 deletions

View File

@ -43,13 +43,6 @@
}
}
function approve_base() {
approve(true);
}
function approve_session() {
approve(false);
}
// Denial has only one
async function deny() {
$appState.currentRequest.response = {approval: 'Denied', base: false};

View File

@ -55,7 +55,14 @@
function cancel() {
emit('credentials-event', 'unlock-canceled');
navigate('Home');
if ($appState.currentRequest !== null) {
// dirty hack to prevent spurious error when returning to approve screen
delete $appState.currentRequest.response;
navigate('Approve');
}
else {
navigate('Home');
}
}
onMount(() => {