From 6e12049f8b84fe7ceaad16d21dc101ff515f828f Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:35:48 -0800 Subject: [PATCH] fix: reset lock screen issue --- packages/extension/src/ui/action/App.vue | 6 +++++- .../extension/src/ui/action/views/reset-wallet/index.vue | 5 +++++ packages/extension/src/ui/action/views/settings/index.vue | 1 + packages/keyring/src/index.ts | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/extension/src/ui/action/App.vue b/packages/extension/src/ui/action/App.vue index c2c2bd430..82ec4d5ba 100644 --- a/packages/extension/src/ui/action/App.vue +++ b/packages/extension/src/ui/action/App.vue @@ -76,7 +76,11 @@ @update:active-networks="setActiveNetworks" /> - + (); + const reset = ref(""); const isProcessing = ref(false); @@ -63,6 +67,7 @@ const resetAction = async () => { isProcessing.value = true; const keyring = new KeyRingBase(); await keyring.reset(); + emit("action:lock"); openOnboard(); }; diff --git a/packages/extension/src/ui/action/views/settings/index.vue b/packages/extension/src/ui/action/views/settings/index.vue index 296912393..54d61ab33 100644 --- a/packages/extension/src/ui/action/views/settings/index.vue +++ b/packages/extension/src/ui/action/views/settings/index.vue @@ -34,6 +34,7 @@ /> diff --git a/packages/keyring/src/index.ts b/packages/keyring/src/index.ts index 23725c3ab..080054c42 100644 --- a/packages/keyring/src/index.ts +++ b/packages/keyring/src/index.ts @@ -334,6 +334,7 @@ class KeyRing { } async reset(): Promise { + this.lock(); const resetPromises = Object.values(configs.STORAGE_KEYS).map((name) => this.#storage.remove(name) );