Replace is_linked() by is_paired()

This commit is contained in:
Sosthene 2024-11-30 20:03:20 +01:00
parent 1d5869561a
commit bb1e5afb2f

View File

@ -276,14 +276,10 @@ pub fn create_new_device(birthday: u32, network_str: String) -> ApiResult<String
} }
#[wasm_bindgen] #[wasm_bindgen]
pub fn is_linking() -> ApiResult<bool> { pub fn is_paired() -> ApiResult<bool> {
let local_device = lock_local_device()?; let local_device = lock_local_device()?;
if local_device.is_linked() || local_device.is_linking() { Ok(local_device.get_pairing_commitment().is_some())
Ok(true)
} else {
Ok(false)
}
} }
#[wasm_bindgen] #[wasm_bindgen]