diff --git a/app/assets/javascripts/crypto.ts b/app/assets/javascripts/crypto.ts new file mode 100644 index 000000000..28c1edb8d --- /dev/null +++ b/app/assets/javascripts/crypto.ts @@ -0,0 +1,3 @@ +import { SNWebCrypto } from "@standardnotes/sncrypto-web"; + +export const Crypto = new SNWebCrypto(); diff --git a/app/assets/javascripts/ui_models/application.ts b/app/assets/javascripts/ui_models/application.ts index aa8315fc6..7684cd9e6 100644 --- a/app/assets/javascripts/ui_models/application.ts +++ b/app/assets/javascripts/ui_models/application.ts @@ -25,8 +25,8 @@ import { KeyboardManager } from '@/services'; import { AppState } from '@/ui_models/app_state'; -import { SNWebCrypto } from '@standardnotes/sncrypto-web'; import { Bridge } from '@/services/bridge'; +import { Crypto } from '@/crypto'; type WebServices = { appState: AppState; @@ -60,7 +60,7 @@ export class WebApplication extends SNApplication { bridge.environment, platformFromString(getPlatformString()), deviceInterface, - new SNWebCrypto(), + Crypto, new AlertService(), identifier, undefined,