From 6e0ea248ff2b978754331e59f684a5b7a8d4341d Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 23 Apr 2024 14:03:22 +0100 Subject: Deprivatize MessageParams getters --- src/message.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/message.rs') diff --git a/src/message.rs b/src/message.rs index 14973bf..1f22779 100644 --- a/src/message.rs +++ b/src/message.rs @@ -28,15 +28,15 @@ impl<'a, 'b> MessageParams<'a, 'b> { } } - fn tx_net(&self) -> i64 { + pub fn tx_net(&self) -> i64 { (self.tx.received as i64) - (self.tx.sent as i64) } - fn tx_height(&self) -> Option { + pub fn tx_height(&self) -> Option { self.tx.confirmation_time.as_ref().map(|x| x.height) } - fn confs(&self) -> u32 { + pub fn confs(&self) -> u32 { let current_height = self.current_height; self.tx_height() .map(|h| { @@ -49,7 +49,7 @@ impl<'a, 'b> MessageParams<'a, 'b> { .unwrap_or_default() } - fn conf_timestamp(&self) -> String { + pub fn conf_timestamp(&self) -> String { self.tx .confirmation_time .as_ref() @@ -62,10 +62,10 @@ impl<'a, 'b> MessageParams<'a, 'b> { .unwrap_or_default() } - fn txid(&self) -> String { + pub fn txid(&self) -> String { self.tx.txid.to_string() } - fn txid_short(&self) -> String { + pub fn txid_short(&self) -> String { let txid = self.txid(); format!("{}...{}", &txid[..6], &txid[txid.len() - 6..]) } -- cgit v1.2.3-70-g09d2