From 061c8217b3d87f6fd5574ad5a1caf27daaaef88c Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Mon, 21 Oct 2024 11:59:07 +0200 Subject: [PATCH] - Remove deprecated `MatrixClient.keyBackupKeyFromPassword` call. (#28233) - The `keyBackupKeyFromPassword` call is bound to the `keyCallback` props in `RestoreKeyBackupDialog` which is not used in `CreateSecretStorageDialog` - Remove code bound to `keyCallback` props --- .../dialogs/security/CreateSecretStorageDialog.tsx | 3 --- .../dialogs/security/RestoreKeyBackupDialog.tsx | 14 -------------- .../security/CreateSecretStorageDialog-test.tsx | 2 -- 3 files changed, 19 deletions(-) diff --git a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx index 441f217be9b..2278fb38060 100644 --- a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx +++ b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx @@ -404,13 +404,10 @@ export default class CreateSecretStorageDialog extends React.PureComponent => { - const keyCallback = (k: Uint8Array): void => {}; - const { finished } = Modal.createDialog( RestoreKeyBackupDialog, { showSummary: false, - keyCallback, }, undefined, /* priority = */ false, diff --git a/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx b/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx index 3b54f4f1973..be76491c2fc 100644 --- a/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx +++ b/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx @@ -37,9 +37,6 @@ interface IProps { // if false, will close the dialog as soon as the restore completes successfully // default: true showSummary?: boolean; - // If specified, gather the key from the user but then call the function with the backup - // key rather than actually (necessarily) restoring the backup. - keyCallback?: (key: Uint8Array) => void; onFinished(done?: boolean): void; } @@ -156,13 +153,6 @@ export default class RestoreKeyBackupDialog extends React.PureComponent { expect(modalSpy).toHaveBeenCalledWith( RestoreKeyBackupDialog, { - keyCallback: expect.any(Function), showSummary: false, }, undefined, @@ -200,7 +199,6 @@ describe("CreateSecretStorageDialog", () => { expect(modalSpy).toHaveBeenCalledWith( RestoreKeyBackupDialog, { - keyCallback: expect.any(Function), showSummary: false, }, undefined,