Skip to content

Commit

Permalink
runfix: apply new core changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykBuniX committed Oct 20, 2022
1 parent 9fd888f commit bf31dc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/script/auth/module/action/AuthAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class AuthAction {
dispatch(AuthActionCreator.startLogin());
try {
// we first init the core without initializing the client for now (this will be done later on)
await core.init(clientType, undefined, false);
await core.init(clientType, {initClient: false});
await this.persistAuthData(clientType, core, dispatch, localStorageAction);
await dispatch(selfAction.fetchSelf());
await dispatch(cookieAction.setCookie(COOKIE_NAME_APP_OPENED, {appInstanceId: getConfig().APP_INSTANCE_ID}));
Expand Down Expand Up @@ -361,7 +361,7 @@ export class AuthAction {
}
const clientType = persist ? ClientType.PERMANENT : ClientType.TEMPORARY;

await core.init(clientType, undefined, false);
await core.init(clientType, {initClient: false});
await this.persistAuthData(clientType, core, dispatch, localStorageAction);

if (options.shouldValidateLocalClient) {
Expand Down
4 changes: 2 additions & 2 deletions src/script/service/CoreSingleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {Config} from '../Config';

declare global {
interface Window {
secretsCrypto?: {
systemCrypto?: {
decrypt: (value: Uint8Array) => Promise<Uint8Array>;
encrypt: (encrypted: Uint8Array) => Promise<Uint8Array>;
};
Expand All @@ -54,7 +54,7 @@ export class Core extends Account<Uint8Array> {
* When in an browser context, then this secretsCrypto will be undefined and the core will then use it's internal encryption system
*/
keyingMaterialUpdateThreshold: Config.getConfig().FEATURE.MLS_CONFIG_KEYING_MATERIAL_UPDATE_THRESHOLD,
secretsCrypto: window.secretsCrypto,
systemCrypto: window.systemCrypto,
}
: undefined,
nbPrekeys: 100,
Expand Down

0 comments on commit bf31dc1

Please sign in to comment.