Enable the rust-crypto labs button (#12114)

* `LabsUserSettingsTab-test.tsx`: use a real `SdkConfig`

... instead of mocking it out. Doing so allows us more flexibility, and gives a
more realistic test.

* Enable the rust-crypto labs button

* fix up a test
This commit is contained in:
Richard van der Hoff 2024-01-18 11:18:55 +00:00 committed by GitHub
parent b64d2e734a
commit b6364a4cea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 139 additions and 20 deletions

View file

@ -52,6 +52,7 @@ import ErrorDialog from "./components/views/dialogs/ErrorDialog";
import PlatformPeg from "./PlatformPeg";
import { formatList } from "./utils/FormattingUtils";
import SdkConfig from "./SdkConfig";
import { Features } from "./settings/Settings";
export interface IMatrixClientCreds {
homeserverUrl: string;
@ -301,7 +302,7 @@ class MatrixClientPegClass implements IMatrixClientPeg {
throw new Error("createClient must be called first");
}
const useRustCrypto = SettingsStore.getValue("feature_rust_crypto");
const useRustCrypto = SettingsStore.getValue(Features.RustCrypto);
// we want to make sure that the same crypto implementation is used throughout the lifetime of a device,
// so persist the setting at the device layer