From 0070939389adf63fe0aaa2e651889f5655f25f46 Mon Sep 17 00:00:00 2001 From: Marcos Kichel Date: Tue, 23 Jul 2024 18:04:13 -0300 Subject: [PATCH] feat: assert seedId is a string on exportKey --- features/keychain/module/keychain.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features/keychain/module/keychain.js b/features/keychain/module/keychain.js index 0b47a54e..77b7ecf0 100644 --- a/features/keychain/module/keychain.js +++ b/features/keychain/module/keychain.js @@ -127,8 +127,10 @@ export class Keychain { } async exportKey({ seedId, keyId, exportPrivate }) { + assert(typeof seedId === 'string', 'seedId must be a string') + if (exportPrivate) { - this.#assertPrivateKeysUnlocked(seedId ? [seedId] : undefined) + this.#assertPrivateKeysUnlocked(seedId) } keyId = new KeyIdentifier(keyId)