From 8f8315d83c037d62b3f531df2072df3a6cb05f09 Mon Sep 17 00:00:00 2001 From: Ashoat Tevosyan Date: Mon, 30 Sep 2024 14:59:45 -0400 Subject: [PATCH] [native] Combine invokeAsync calls at the end of initializeCryptoAccount Summary: I think these were accidentally split up in D11232. In the first revision of that diff, it made sense to separate them. By the final revision, it no longer made sense, but the split was left there. Depends on D13526 Test Plan: Confirm that the app builds and that `initializeCryptoAccount` still executes successfully Reviewers: varun, will Reviewed By: will Subscribers: tomek Differential Revision: https://phab.comm.dev/D13527 --- native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp index 9e304c63b4..dc05f072f3 100644 --- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp +++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp @@ -685,10 +685,8 @@ jsi::Value CommCoreModule::initializeCryptoAccount(jsi::Runtime &rt) { promise->reject(error); return; } + promise->resolve(jsi::Value::undefined()); }); - - this->jsInvoker_->invokeAsync( - [=]() { promise->resolve(jsi::Value::undefined()); }); }; try { this->cryptoThread->scheduleTask(cryptoJob);