| 360 | } |
| 361 | |
| 362 | jsi::Value CommRustModule::deletePasswordUser( |
| 363 | jsi::Runtime &rt, |
| 364 | jsi::String userID, |
| 365 | jsi::String deviceID, |
| 366 | jsi::String accessToken, |
| 367 | jsi::String password) { |
| 368 | auto userIDRust = jsiStringToRustString(userID, rt); |
| 369 | auto deviceIDRust = jsiStringToRustString(deviceID, rt); |
| 370 | auto accessTokenRust = jsiStringToRustString(accessToken, rt); |
| 371 | auto passwordRust = jsiStringToRustString(password, rt); |
| 372 | |
| 373 | return createPromiseAsJSIValue( |
| 374 | rt, [=, this](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) { |
| 375 | std::string error; |
| 376 | try { |
| 377 | auto currentID = RustPromiseManager::instance.addPromise( |
| 378 | {promise, this->jsInvoker_, innerRt}); |
| 379 | identityDeletePasswordUser( |
| 380 | userIDRust, |
| 381 | deviceIDRust, |
| 382 | accessTokenRust, |
| 383 | passwordRust, |
| 384 | currentID); |
| 385 | } catch (const std::exception &e) { |
| 386 | error = e.what(); |
| 387 | }; |
| 388 | if (!error.empty()) { |
| 389 | this->jsInvoker_->invokeAsync( |
| 390 | [error, promise]() { promise->reject(error); }); |
| 391 | } |
| 392 | }); |
| 393 | } |
| 394 | |
| 395 | jsi::Value CommRustModule::deleteWalletUser( |
| 396 | jsi::Runtime &rt, |
nothing calls this directly
no test coverage detected