From b7877775759f7df44441775411b9c0eb52e0ea01 Mon Sep 17 00:00:00 2001 From: Julia Samol Date: Fri, 29 Sep 2023 08:56:20 +0200 Subject: [PATCH] Fix/isolated-modules-env --- .../js/environment/JavaScriptEngineEnvironment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/java/it/airgap/wallet/plugin/isolatedmodules/js/environment/JavaScriptEngineEnvironment.kt b/android/app/src/main/java/it/airgap/wallet/plugin/isolatedmodules/js/environment/JavaScriptEngineEnvironment.kt index 00242a76d..48d7d4b80 100644 --- a/android/app/src/main/java/it/airgap/wallet/plugin/isolatedmodules/js/environment/JavaScriptEngineEnvironment.kt +++ b/android/app/src/main/java/it/airgap/wallet/plugin/isolatedmodules/js/environment/JavaScriptEngineEnvironment.kt @@ -25,7 +25,7 @@ class JavaScriptEngineEnvironment( private val context: Context, private val fileExplorer: FileExplorer, ) : JSEnvironment { - private val sandbox: Deferred = JavaScriptSandbox.createConnectedInstanceAsync(context).asDeferred() + private val sandbox: Deferred by lazy { JavaScriptSandbox.createConnectedInstanceAsync(context).asDeferred() } private val isolatedMutex: Mutex = Mutex() private val isolates: MutableMap = mutableMapOf()