Skip to content

Commit

Permalink
feat: assert seedId is a string on exportKey
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskichel committed Jul 23, 2024
1 parent f8d8afb commit 0070939
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion features/keychain/module/keychain.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0070939

Please sign in to comment.