Skip to content

Commit 13b9210

Browse files
authored
fix: avoid unneeded request of application password (hashgraph#2492)
EmailLoginForm.handleOnFormSubmit() now invokes user.setPassword() before user.refretchOrganizations() Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com>
1 parent 058aeee commit 13b9210

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

front-end/src/renderer/pages/UserLogin/components/EmailLoginForm.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@ const handleOnFormSubmit = async () => {
109109
110110
user.setAccountSetupStarted(true);
111111
await user.login(id, email, false);
112-
await user.refetchOrganizations();
113-
await setupStores();
114-
115112
if (isUserLoggedIn(user.personal)) {
116113
user.setPassword(inputPassword.value);
117114
}
115+
await user.refetchOrganizations();
116+
await setupStores();
118117
119118
await router.push({ name: 'accountSetup' });
120119
} else if (!props.shouldRegister) {
@@ -141,12 +140,11 @@ const handleOnFormSubmit = async () => {
141140
try {
142141
globalModalLoaderRef?.value?.open();
143142
await user.login(userData.id, userData.email.trim(), false);
144-
await user.refetchOrganizations();
145-
await setupStores();
146-
147143
if (isUserLoggedIn(user.personal)) {
148144
user.setPassword(inputPassword.value);
149145
}
146+
await user.refetchOrganizations();
147+
await setupStores();
150148
151149
if (user.secretHashes.length === 0) {
152150
await router.push({ name: 'accountSetup' });

0 commit comments

Comments
 (0)