From efdbe2217c9c4036e51cdc2ec385a48ba99c43bc Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Thu, 19 Sep 2024 14:48:25 +0000 Subject: [PATCH] chore: remove unused properties from CoreManager CoreManager was storing two properties, `#projectKey` and `#state`, which were never used. This removes them. --- src/core-manager/index.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/core-manager/index.js b/src/core-manager/index.js index 68c9a326..d9c5fde3 100644 --- a/src/core-manager/index.js +++ b/src/core-manager/index.js @@ -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 @@ -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 @@ -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' } /**