Fix FFI shared lib

This commit is contained in:
mfahampshire
2025-10-20 18:59:19 +01:00
parent 0208a84b77
commit 18e8dfe394
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -143,9 +143,9 @@ members = [
"nym-statistics-api",
"nym-validator-rewarder",
"nyx-chain-watcher",
# "sdk/ffi/cpp",
# "sdk/ffi/go",
# "sdk/ffi/shared",
"sdk/ffi/cpp",
"sdk/ffi/go",
"sdk/ffi/shared",
"sdk/rust/nym-sdk",
"mixtcp",
# "service-providers/authenticator",
+4 -4
View File
@@ -84,12 +84,12 @@ pub fn send_message_internal(
message: &str,
// TODO add Option<surb_amount>, if Some(surb_amount) call send_message() instead with specified #, else send_plain_message as this uses the default
) -> Result<(), Error> {
let client = NYM_CLIENT.lock().expect("could not lock NYM_CLIENT");
let mut client = NYM_CLIENT.lock().expect("could not lock NYM_CLIENT");
if client.is_none() {
bail!("Client is not yet initialised");
}
let nym_client = client
.as_ref()
.as_mut()
.ok_or_else(|| anyhow!("could not get client as_ref()"))?;
RUNTIME.block_on(async move {
@@ -102,12 +102,12 @@ pub fn send_message_internal(
// TODO send_raw_message_internal
pub fn reply_internal(recipient: AnonymousSenderTag, message: &str) -> Result<(), Error> {
let client = NYM_CLIENT.lock().expect("could not lock NYM_CLIENT");
let mut client = NYM_CLIENT.lock().expect("could not lock NYM_CLIENT");
if client.is_none() {
bail!("Client is not yet initialised");
}
let nym_client = client
.as_ref()
.as_mut()
.ok_or_else(|| anyhow!("could not get client as_ref()"))?;
RUNTIME.block_on(async move {