Skip to content

Commit

Permalink
Clear profile manager fields when the user switches between Login and…
Browse files Browse the repository at this point in the history
… Connect.
  • Loading branch information
Mahmoud-Emad committed Jun 12, 2023
1 parent 468b501 commit 9a91234
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/playground/src/weblets/profile_manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
@tab:change="
() => {
clearError();
passwordInput.validate(password);
clearFields();
}
"
>
Expand Down Expand Up @@ -295,6 +295,15 @@ watch(
m => {
if (m) {
nextTick().then(mounted);
} else {
nextTick().then(() => {
if (isStoredCredentials()) {
activeTab.value = 0;
} else {
activeTab.value = 1;
}
clearFields();
});
}
},
);
Expand Down Expand Up @@ -412,6 +421,11 @@ function clearError() {
createAccountError.value = null;
}
function clearFields() {
password.value = "";
mnemonic.value = "";
}
async function activate(mnemonic: string) {
clearError();
activating.value = true;
Expand Down

0 comments on commit 9a91234

Please sign in to comment.