From df9dfbf16632a0b9b6df8bb49d018db97cf6e3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20G=C3=B3rka?= Date: Wed, 19 Oct 2022 11:18:33 +0200 Subject: [PATCH] runfix: rename secretsCrypto to systemCrypto to support broken internal clients (#6094) --- electron/src/global.ts | 2 +- electron/src/preload/preload-webview.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/electron/src/global.ts b/electron/src/global.ts index a775e94096a..b23f767e096 100644 --- a/electron/src/global.ts +++ b/electron/src/global.ts @@ -63,7 +63,7 @@ declare global { }; environment: typeof EnvironmentUtil; openGraphAsync(url: string): Promise; - secretsCrypto?: { + systemCrypto?: { decrypt: (value: Uint8Array) => Promise; encrypt: (encrypted: Uint8Array) => Promise; }; diff --git a/electron/src/preload/preload-webview.ts b/electron/src/preload/preload-webview.ts index 4ee5c25e4d7..7a1395cb323 100644 --- a/electron/src/preload/preload-webview.ts +++ b/electron/src/preload/preload-webview.ts @@ -242,7 +242,7 @@ process.once('loaded', () => { global.desktopCapturer = { getDesktopSources: opts => ipcRenderer.invoke(EVENT_TYPE.ACTION.GET_DESKTOP_SOURCES, opts), }; - global.secretsCrypto = { + global.systemCrypto = { decrypt: async (encrypted: Uint8Array): Promise => { const plainText = await ipcRenderer.invoke(EVENT_TYPE.ACTION.DECRYPT, encrypted); return Decoder.fromBase64(plainText).asBytes;