diff --git a/src/api.rs b/src/api.rs index 49db961..ae16a12 100644 --- a/src/api.rs +++ b/src/api.rs @@ -276,14 +276,10 @@ pub fn create_new_device(birthday: u32, network_str: String) -> ApiResult ApiResult { +pub fn is_paired() -> ApiResult { let local_device = lock_local_device()?; - if local_device.is_linked() || local_device.is_linking() { - Ok(true) - } else { - Ok(false) - } + Ok(local_device.get_pairing_commitment().is_some()) } #[wasm_bindgen]