MCPcopy Create free account
hub / github.com/CommE2E/comm / deletePasswordUser

Method deletePasswordUser

native/cpp/CommonCpp/NativeModules/CommRustModule.cpp:362–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362jsi::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
395jsi::Value CommRustModule::deleteWalletUser(
396 jsi::Runtime &rt,

Callers

nothing calls this directly

Calls 4

jsiStringToRustStringFunction · 0.85
addPromiseMethod · 0.80
rejectMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected