From 7e03c80f8c90df1fc1d27a7a1656e9eb526b88d5 Mon Sep 17 00:00:00 2001 From: Zhe Li Date: Thu, 22 Aug 2024 06:36:49 +0800 Subject: [PATCH] fix add account issue --- src/components/Popup/AddAccountPage.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Popup/AddAccountPage.vue b/src/components/Popup/AddAccountPage.vue index 371db9d8..20e82e9b 100644 --- a/src/components/Popup/AddAccountPage.vue +++ b/src/components/Popup/AddAccountPage.vue @@ -115,6 +115,11 @@ export default Vue.extend({ this.newAccount.period = undefined; } + const defaultEncyptionKey = this.$store.state.accounts.defaultEncryption; + const encryption = this.$store.state.accounts.encryption[ + defaultEncyptionKey + ]; + const entry = new OTPEntry( { type, @@ -128,7 +133,7 @@ export default Vue.extend({ digits: this.newAccount.digits, algorithm: this.newAccount.algorithm, }, - this.$store.state.accounts.encryption + encryption ); await entry.create();