Fix confirmation send message (#3393)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-06-07 23:27:12 +06:00 committed by GitHub
parent d5e05011db
commit 37aeb9f466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -20,7 +20,7 @@
onMount(async () => {
const account = await getAccount()
if (account?.confirmed !== true) {
if (account?.confirmed === true) {
const loc = getCurrentLocation()
loc.path[1] = 'selectWorkspace'
loc.path.length = 2
@ -29,7 +29,7 @@
})
</script>
<div class="flex-center h-full p-10">
<div class="flex-center h-full p-10 caption-color">
<div class="flex-col-center text-center">
<h4>
<Label label={login.string.ConfirmationSent} />

View File

@ -50,7 +50,15 @@
async function _getWorkspaces (): Promise<Workspace[]> {
try {
return getWorkspaces()
const res = await getWorkspaces()
if (res.length === 0 && account?.confirmed === false) {
const loc = getCurrentLocation()
loc.path[1] = 'confirmationSend'
loc.path.length = 2
navigate(loc)
return []
}
return res
} catch (err: any) {
setMetadataLocalStorage(presentation.metadata.Token, null)
setMetadataLocalStorage(login.metadata.LoginEndpoint, null)