switch to invokes instead of emits
This commit is contained in:
@ -9,16 +9,12 @@
|
||||
let passphrase = '';
|
||||
async function unlock() {
|
||||
console.log('invoking unlock command.')
|
||||
let res = await invoke('unlock', {passphrase});
|
||||
if (res) {
|
||||
appState.credentialStatus = 'unlocked';
|
||||
console.log('Unlock successful!');
|
||||
if (appState.currentRequest) {
|
||||
dispatch('navigate', {target: 'ShowApproved'});
|
||||
}
|
||||
|
||||
try {
|
||||
await invoke('unlock', {passphrase});
|
||||
}
|
||||
else {
|
||||
// indicate decryption failed
|
||||
catch (e) {
|
||||
console.log('Unlock error:', e);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user