From 0381af599cd8969ab52c4468e174bc8ec1fa0033 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Fri, 14 Jan 2022 18:50:45 +0300 Subject: [PATCH 1/2] Deprecating `TransactionBody::multiassets` --- rust/src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 8b14c93d..52eb940a 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -305,10 +305,20 @@ impl TransactionBody { self.mint = Some(mint.clone()) } - pub fn multiassets(&self) -> Option { + pub fn get_mint(&self) -> Option { self.mint.clone() } + /// This function returns the mint value of the transaction + /// Use `get_mint` instead. + #[deprecated( + since = "10.0.0", + note = "Weird naming. Use `get_mint`" + )] + pub fn multiassets(&self) -> Option { + self.get_mint() + } + pub fn set_script_data_hash(&mut self, script_data_hash: &ScriptDataHash) { self.script_data_hash = Some(script_data_hash.clone()) } From 591ecab2d6930c6230da1b495c9441c4ad408985 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Sat, 15 Jan 2022 10:14:46 +0300 Subject: [PATCH 2/2] Changing `get_mint()` to `mint()` --- rust/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 52eb940a..819c9154 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -305,18 +305,18 @@ impl TransactionBody { self.mint = Some(mint.clone()) } - pub fn get_mint(&self) -> Option { + pub fn mint(&self) -> Option { self.mint.clone() } /// This function returns the mint value of the transaction - /// Use `get_mint` instead. + /// Use `.mint()` instead. #[deprecated( since = "10.0.0", - note = "Weird naming. Use `get_mint`" + note = "Weird naming. Use `.mint()`" )] pub fn multiassets(&self) -> Option { - self.get_mint() + self.mint() } pub fn set_script_data_hash(&mut self, script_data_hash: &ScriptDataHash) {