diff --git a/src/api.rs b/src/api.rs index 4ce15ba..0631220 100644 --- a/src/api.rs +++ b/src/api.rs @@ -253,7 +253,6 @@ pub fn get_address() -> ApiResult { .get_sp_client() .get_receiving_address() .to_string(); - debug!("{}", address); Ok(address) } @@ -1451,7 +1450,8 @@ pub fn create_update_message( } // We shouldn't ever have error here since we already checked above - let shared_secret = shared_secrets.get_secret_for_address(sp_address.as_str().try_into()?).unwrap(); + let shared_secret = shared_secrets.get_secret_for_address(sp_address.as_str().try_into()?) + .ok_or(AnyhowError::msg("Failed to retrieve secret".to_owned()))?; let cipher = encrypt_with_key(shared_secret.as_byte_array(), prd_msg.as_bytes())?; ciphers.push(cipher.to_lower_hex_string());