Deprecate storageServiceKey in SyncMessage.Keys

This commit is contained in:
Fedor Indutny 2023-10-12 21:42:24 +02:00 committed by GitHub
parent 37b3a6de4b
commit d7b53f3d27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 26 deletions

View file

@ -355,12 +355,23 @@ export class FetchLatestEvent extends ConfirmableEvent {
}
}
export type KeysEventData = Readonly<{
storageServiceKey: Uint8Array | undefined;
masterKey: Uint8Array | undefined;
}>;
export class KeysEvent extends ConfirmableEvent {
public readonly storageServiceKey: Uint8Array | undefined;
public readonly masterKey: Uint8Array | undefined;
constructor(
public readonly storageServiceKey: Uint8Array,
{ storageServiceKey, masterKey }: KeysEventData,
confirm: ConfirmCallback
) {
super('keys', confirm);
this.storageServiceKey = storageServiceKey;
this.masterKey = masterKey;
}
}