You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
Merge pull request #3864 from matrix-org/jryans/complete-sec-confused
Adjust secret storage to work before sync
This commit is contained in:
@@ -107,7 +107,7 @@ export async function accessSecretStorage(func = async () => { }) {
|
|||||||
cachingAllowed = true;
|
cachingAllowed = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!cli.hasSecretStorageKey()) {
|
if (!await cli.hasSecretStorageKey()) {
|
||||||
// This dialog calls bootstrap itself after guiding the user through
|
// This dialog calls bootstrap itself after guiding the user through
|
||||||
// passphrase creation.
|
// passphrase creation.
|
||||||
const { finished } = Modal.createTrackedDialogAsync('Create Secret Storage dialog', '',
|
const { finished } = Modal.createTrackedDialogAsync('Create Secret Storage dialog', '',
|
||||||
|
|||||||
@@ -60,14 +60,14 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||||||
this.setState(this._getUpdatedStatus());
|
this.setState(this._getUpdatedStatus());
|
||||||
};
|
};
|
||||||
|
|
||||||
_getUpdatedStatus() {
|
async _getUpdatedStatus() {
|
||||||
// XXX: Add public accessors if we keep this around in production
|
// XXX: Add public accessors if we keep this around in production
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
const crossSigning = cli._crypto._crossSigningInfo;
|
const crossSigning = cli._crypto._crossSigningInfo;
|
||||||
const secretStorage = cli._crypto._secretStorage;
|
const secretStorage = cli._crypto._secretStorage;
|
||||||
const crossSigningPublicKeysOnDevice = crossSigning.getId();
|
const crossSigningPublicKeysOnDevice = crossSigning.getId();
|
||||||
const crossSigningPrivateKeysInStorage = crossSigning.isStoredInSecretStorage(secretStorage);
|
const crossSigningPrivateKeysInStorage = await crossSigning.isStoredInSecretStorage(secretStorage);
|
||||||
const secretStorageKeyInAccount = secretStorage.hasKey();
|
const secretStorageKeyInAccount = await secretStorage.hasKey();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
crossSigningPublicKeysOnDevice,
|
crossSigningPublicKeysOnDevice,
|
||||||
|
|||||||
Reference in New Issue
Block a user