Skip to content

Commit

Permalink
fix: pass undefined if seedId is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskichel committed Jul 23, 2024
1 parent 359a7af commit f0f4838
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions features/keychain/module/keychain.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class Keychain {

#getPrivateHDKey = ({ seedId, keyId, getPrivateHDKeySymbol }) => {
if (getPrivateHDKeySymbol !== this.#getPrivateHDKeySymbol) {
this.#assertPrivateKeysUnlocked(new Set([seedId]))
this.#assertPrivateKeysUnlocked(seedId ? new Set([seedId]) : undefined)
}

throwIfInvalidKeyIdentifier(keyId)
Expand All @@ -126,7 +126,7 @@ export class Keychain {

async exportKey({ seedId, keyId, exportPrivate }) {
if (exportPrivate) {
this.#assertPrivateKeysUnlocked(new Set([seedId]))
this.#assertPrivateKeysUnlocked(seedId ? new Set([seedId]) : undefined)
}

keyId = new KeyIdentifier(keyId)
Expand Down Expand Up @@ -162,7 +162,7 @@ export class Keychain {
}

async signTx({ seedId, keyIds, signTxCallback, unsignedTx }) {
this.#assertPrivateKeysUnlocked(new Set([seedId]))
this.#assertPrivateKeysUnlocked(seedId ? new Set([seedId]) : undefined)
assert(typeof signTxCallback === 'function', 'signTxCallback must be a function')
const hdkeys = Object.fromEntries(
keyIds.map((keyId) => {
Expand Down

0 comments on commit f0f4838

Please sign in to comment.