Skip to content

Commit

Permalink
chore: remove unused properties from CoreManager
Browse files Browse the repository at this point in the history
CoreManager was storing two properties, `#projectKey` and `#state`,
which were never used. This removes them.
  • Loading branch information
EvanHahn committed Sep 19, 2024
1 parent 8c189c3 commit efdbe22
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/core-manager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ export class CoreManager extends TypedEmitter {
#coreIndex
/** @type {Core} */
#creatorCore
#projectKey
#queries
#encryptionKeys
#projectExtension
/** @type {'opened' | 'closing' | 'closed'} */
#state = 'opened'
#ready
#haveExtension
#deviceId
Expand Down Expand Up @@ -86,7 +83,6 @@ export class CoreManager extends TypedEmitter {
this.#l = Logger.create('coreManager', logger)
const primaryKey = keyManager.getDerivedKey('primaryKey', projectKey)
this.#deviceId = keyManager.getIdentityKeypair().publicKey.toString('hex')
this.#projectKey = projectKey
this.#encryptionKeys = encryptionKeys
this.#autoDownload = autoDownload

Expand Down Expand Up @@ -238,13 +234,11 @@ export class CoreManager extends TypedEmitter {
* TODO: gracefully close replication streams
*/
async close() {
this.#state = 'closing'
const promises = []
for (const { core } of this.#coreIndex) {
promises.push(core.close())
}
await Promise.all(promises)
this.#state = 'closed'
}

/**
Expand Down

0 comments on commit efdbe22

Please sign in to comment.