Skip to content
This repository was archived by the owner on May 18, 2025. It is now read-only.

Commit 29904a7

Browse files
authored
Merge pull request matrix-org#6263 from matrix-org/t3chguy/ts/4
2 parents 3fa89f3 + 6250d9b commit 29904a7

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

src/BasePlatform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ export default abstract class BasePlatform {
348348
/**
349349
* Create and store a pickle key for encrypting libolm objects.
350350
* @param {string} userId the user ID for the user that the pickle key is for.
351-
* @param {string} userId the device ID that the pickle key is for.
351+
* @param {string} deviceId the device ID that the pickle key is for.
352352
* @returns {string|null} the pickle key, or null if the platform does not
353353
* support storing pickle keys.
354354
*/

src/Lifecycle.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020
import { createClient } from 'matrix-js-sdk/src/matrix';
2121
import { InvalidStoreError } from "matrix-js-sdk/src/errors";
2222
import { MatrixClient } from "matrix-js-sdk/src/client";
23-
import { decryptAES, encryptAES } from "matrix-js-sdk/src/crypto/aes";
23+
import { decryptAES, encryptAES, IEncryptedPayload } from "matrix-js-sdk/src/crypto/aes";
2424

2525
import { IMatrixClientCreds, MatrixClientPeg } from './MatrixClientPeg';
2626
import SecurityCustomisations from "./customisations/Security";
@@ -303,7 +303,7 @@ export interface IStoredSession {
303303
hsUrl: string;
304304
isUrl: string;
305305
hasAccessToken: boolean;
306-
accessToken: string | object;
306+
accessToken: string | IEncryptedPayload;
307307
userId: string;
308308
deviceId: string;
309309
isGuest: boolean;
@@ -350,7 +350,7 @@ export async function getStoredSessionVars(): Promise<IStoredSession> {
350350
}
351351

352352
// The pickle key is a string of unspecified length and format. For AES, we
353-
// need a 256-bit Uint8Array. So we HKDF the pickle key to generate the AES
353+
// need a 256-bit Uint8Array. So we HKDF the pickle key to generate the AES
354354
// key. The AES key should be zeroed after it is used.
355355
async function pickleKeyToAesKey(pickleKey: string): Promise<Uint8Array> {
356356
const pickleKeyBuffer = new Uint8Array(pickleKey.length);

src/components/views/dialogs/security/CreateCrossSigningDialog.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ limitations under the License.
1616
*/
1717

1818
import React from 'react';
19+
import { CrossSigningKeys } from 'matrix-js-sdk/src/client';
20+
1921
import { MatrixClientPeg } from '../../../../MatrixClientPeg';
2022
import { _t } from '../../../../languageHandler';
2123
import Modal from '../../../../Modal';
@@ -71,7 +73,7 @@ export default class CreateCrossSigningDialog extends React.PureComponent<IProps
7173

7274
private async queryKeyUploadAuth(): Promise<void> {
7375
try {
74-
await MatrixClientPeg.get().uploadDeviceSigningKeys(null, {});
76+
await MatrixClientPeg.get().uploadDeviceSigningKeys(null, {} as CrossSigningKeys);
7577
// We should never get here: the server should always require
7678
// UI auth to upload device signing keys. If we do, we upload
7779
// no keys which would be a no-op.

src/stores/SetupEncryptionStore.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ limitations under the License.
1616

1717
import EventEmitter from 'events';
1818
import { VerificationRequest } from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
19-
import { IKeyBackupVersion } from "matrix-js-sdk/src/crypto/keybackup";
19+
import { IKeyBackupInfo } from "matrix-js-sdk/src/crypto/keybackup";
2020
import { ISecretStorageKeyInfo } from "matrix-js-sdk/src/matrix";
21+
import { PHASE_DONE as VERIF_PHASE_DONE } from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
22+
2123
import { MatrixClientPeg } from '../MatrixClientPeg';
2224
import { accessSecretStorage, AccessCancelledError } from '../SecurityManager';
23-
import { PHASE_DONE as VERIF_PHASE_DONE } from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
2425

2526
export enum Phase {
2627
Loading = 0,
@@ -35,7 +36,7 @@ export class SetupEncryptionStore extends EventEmitter {
3536
private started: boolean;
3637
public phase: Phase;
3738
public verificationRequest: VerificationRequest;
38-
public backupInfo: IKeyBackupVersion;
39+
public backupInfo: IKeyBackupInfo;
3940
public keyId: string;
4041
public keyInfo: ISecretStorageKeyInfo;
4142
public hasDevicesToVerifyAgainst: boolean;

0 commit comments

Comments
 (0)