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

Method deleteWalletUser

native/cpp/CommonCpp/NativeModules/CommRustModule.cpp:395–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395jsi::Value CommRustModule::deleteWalletUser(
396 jsi::Runtime &rt,
397 jsi::String userID,
398 jsi::String deviceID,
399 jsi::String accessToken) {
400 auto userIDRust = jsiStringToRustString(userID, rt);
401 auto deviceIDRust = jsiStringToRustString(deviceID, rt);
402 auto accessTokenRust = jsiStringToRustString(accessToken, rt);
403
404 return createPromiseAsJSIValue(
405 rt, [=, this](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {
406 std::string error;
407 try {
408 auto currentID = RustPromiseManager::instance.addPromise(
409 {promise, this->jsInvoker_, innerRt});
410 identityDeleteWalletUser(
411 userIDRust, deviceIDRust, accessTokenRust, currentID);
412 } catch (const std::exception &e) {
413 error = e.what();
414 };
415 if (!error.empty()) {
416 this->jsInvoker_->invokeAsync(
417 [error, promise]() { promise->reject(error); });
418 }
419 });
420}
421
422jsi::Value CommRustModule::logOut(
423 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