From e77186354b09db34b47601a6217d30ee2839fa47 Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Fri, 17 Jan 2025 20:51:37 -0300 Subject: [PATCH] frost-client: fix error if there is no self contact --- frost-client/src/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frost-client/src/config.rs b/frost-client/src/config.rs index 9fce935..260397a 100644 --- a/frost-client/src/config.rs +++ b/frost-client/src/config.rs @@ -30,6 +30,13 @@ pub struct Config { impl Config { pub fn contact_by_pubkey(&self, pubkey: &[u8]) -> Result> { + if Some(pubkey) == self.communication_key.as_ref().map(|c| c.pubkey.as_slice()) { + return Ok(Contact { + version: Some(0), + name: "".to_string(), + pubkey: pubkey.to_vec(), + }); + } Ok(self .contact .values()