From 1de617931ecb9996df0c388b9ea47f0332c2e987 Mon Sep 17 00:00:00 2001 From: andrejborstnik Date: Tue, 2 Apr 2024 18:26:20 +0200 Subject: [PATCH] feat: export arePrivateKeysLocked in api --- features/keychain/api/index.js | 1 + features/keychain/module/keychain.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/features/keychain/api/index.js b/features/keychain/api/index.js index 4a242026..e148f977 100644 --- a/features/keychain/api/index.js +++ b/features/keychain/api/index.js @@ -2,6 +2,7 @@ const createKeychainApi = ({ keychain }) => { return { keychain: { exportKey: (...args) => keychain.exportKey(...args), + arePrivateKeysLocked: () => keychain.arePrivateKeysLocked(), sodium: { signDetached: keychain.sodium.signDetached, getKeysFromSeed: (...args) => diff --git a/features/keychain/module/keychain.js b/features/keychain/module/keychain.js index 889786ad..bd2bade5 100644 --- a/features/keychain/module/keychain.js +++ b/features/keychain/module/keychain.js @@ -48,7 +48,7 @@ export class Keychain { assert(!this.#privateKeysAreLocked, 'private keys are locked') } - hasLockedPrivateKeys() { + arePrivateKeysLocked() { return this.#privateKeysAreLocked }