diff --git a/src/network.rs b/src/network.rs index ff0c95e..7e66269 100644 --- a/src/network.rs +++ b/src/network.rs @@ -135,7 +135,6 @@ pub enum CachedMessageStatus { NoStatus, CipherWaitingTx, TxWaitingPrd, - Opened, // Can receive more messages } /// Unique struct for both 4nk messages and notification/key exchange, both rust and ts @@ -148,12 +147,8 @@ pub struct CachedMessage { pub transaction: Option, pub commitment: Option, // content of the op_return pub sender: Option, // Never None when message sent - pub recipient: Option, // Never None when message sent pub shared_secrets: Vec, // Max 2 secrets in case we send to both address of the recipient pub cipher: Vec, // Max 2 ciphers in case we send to both address of the recipient - pub prd: Option, // Never None when message sent - pub pcd: Option, // Value is here an alias for impl Pcd - pub confirmed_by: Option, // If this None, Sender keeps sending pub timestamp: u64, } @@ -176,7 +171,7 @@ impl CachedMessage { serde_json::to_string(self).unwrap() } - pub fn try_decrypt_message(&self, cipher: Vec) -> Result> { + pub fn try_decrypt_message(&self, cipher: &[u8]) -> Result> { if self.shared_secrets.is_empty() { return Err(Error::msg( "Can't try decrypt this message, there's no shared secret",