Add accessSecretStorage
helper with common flow setup
This moves the details of dialogs that may be needed when accessing secret storage to centralised helper. In addition, this clears the secret storage key cache so that keys are only live for a single operation.
This commit is contained in:
parent
c5099b9b96
commit
66f7600969
4 changed files with 78 additions and 39 deletions
|
@ -31,7 +31,7 @@ import {verificationMethods} from 'matrix-js-sdk/lib/crypto';
|
|||
import MatrixClientBackedSettingsHandler from "./settings/handlers/MatrixClientBackedSettingsHandler";
|
||||
import * as StorageManager from './utils/StorageManager';
|
||||
import IdentityAuthClient from './IdentityAuthClient';
|
||||
import * as CrossSigningManager from './CrossSigningManager';
|
||||
import { crossSigningCallbacks } from './CrossSigningManager';
|
||||
|
||||
interface MatrixClientCreds {
|
||||
homeserverUrl: string,
|
||||
|
@ -224,7 +224,7 @@ class MatrixClientPeg {
|
|||
|
||||
opts.cryptoCallbacks = {};
|
||||
if (SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||
Object.assign(opts.cryptoCallbacks, CrossSigningManager);
|
||||
Object.assign(opts.cryptoCallbacks, crossSigningCallbacks);
|
||||
}
|
||||
|
||||
this.matrixClient = createMatrixClient(opts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue