diff --git a/dan_layer/template_lib/src/models/non_fungible.rs b/dan_layer/template_lib/src/models/non_fungible.rs index 6a9d5c9e9..2d076b4ce 100644 --- a/dan_layer/template_lib/src/models/non_fungible.rs +++ b/dan_layer/template_lib/src/models/non_fungible.rs @@ -281,7 +281,7 @@ impl FromStr for NonFungibleAddress { type Err = ParseNonFungibleAddressError; fn from_str(s: &str) -> Result { - // the expected format is nft_{resource_hex}_{type}_{" + // the expected format is nft_{resource_hex}_{type}_{id} let mut splitted = s.split('_'); if let Some(token) = splitted.next() { @@ -347,22 +347,28 @@ impl NonFungible { /// Returns a copy of the immutable data of the token. /// This data is set up during the token minting process and cannot be updated pub fn get_data(&self) -> T { - let resp: InvokeResult = call_engine(EngineOp::NonFungibleInvoke, &NonFungibleInvokeArg { - address: self.address.clone(), - action: NonFungibleAction::GetData, - args: vec![], - }); + let resp: InvokeResult = call_engine( + EngineOp::NonFungibleInvoke, + &NonFungibleInvokeArg { + address: self.address.clone(), + action: NonFungibleAction::GetData, + args: vec![], + }, + ); resp.decode().expect("[get_data] Failed to decode NonFungible data") } /// Returns a copy of the mutable data of the token pub fn get_mutable_data(&self) -> T { - let resp: InvokeResult = call_engine(EngineOp::NonFungibleInvoke, &NonFungibleInvokeArg { - address: self.address.clone(), - action: NonFungibleAction::GetMutableData, - args: vec![], - }); + let resp: InvokeResult = call_engine( + EngineOp::NonFungibleInvoke, + &NonFungibleInvokeArg { + address: self.address.clone(), + action: NonFungibleAction::GetMutableData, + args: vec![], + }, + ); resp.decode() .expect("[get_mutable_data] Failed to decode raw NonFungible mutable data")