Remove AccountPasswordStore and related flows (#28750)
* Remove AccountPasswordStore and related flows As they are no longer needed since MSC3967 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Improve coverage Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update src/CreateCrossSigning.ts Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Update comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2c4a079153
commit
cd7cf86b96
@@ -11,7 +11,6 @@ import { MatrixClient, Device } from "matrix-js-sdk/src/matrix";
|
||||
import { SecretStorageKeyDescriptionAesV1, ServerSideSecretStorage } from "matrix-js-sdk/src/secret-storage";
|
||||
import { BootstrapCrossSigningOpts, CryptoApi, DeviceVerificationStatus } from "matrix-js-sdk/src/crypto-api";
|
||||
|
||||
import { SdkContextClass } from "../../../src/contexts/SDKContext";
|
||||
import { accessSecretStorage } from "../../../src/SecurityManager";
|
||||
import { SetupEncryptionStore } from "../../../src/stores/SetupEncryptionStore";
|
||||
import { emitPromise, stubClient } from "../../test-utils";
|
||||
@@ -21,7 +20,6 @@ jest.mock("../../../src/SecurityManager", () => ({
|
||||
}));
|
||||
|
||||
describe("SetupEncryptionStore", () => {
|
||||
const cachedPassword = "p4assword";
|
||||
let client: Mocked<MatrixClient>;
|
||||
let mockCrypto: Mocked<CryptoApi>;
|
||||
let mockSecretStorage: Mocked<ServerSideSecretStorage>;
|
||||
@@ -47,11 +45,6 @@ describe("SetupEncryptionStore", () => {
|
||||
Object.defineProperty(client, "secretStorage", { value: mockSecretStorage });
|
||||
|
||||
setupEncryptionStore = new SetupEncryptionStore();
|
||||
SdkContextClass.instance.accountPasswordStore.setPassword(cachedPassword);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
SdkContextClass.instance.accountPasswordStore.clearPassword();
|
||||
});
|
||||
|
||||
describe("start", () => {
|
||||
@@ -172,7 +165,6 @@ describe("SetupEncryptionStore", () => {
|
||||
await setupEncryptionStore.resetConfirm();
|
||||
|
||||
expect(mocked(accessSecretStorage)).toHaveBeenCalledWith(expect.any(Function), {
|
||||
accountPassword: cachedPassword,
|
||||
forceReset: true,
|
||||
resetCrossSigning: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user