git.delta.rocks / unique-network / refs/commits / 6ef230f131ca

difftreelog

misk: remove token_uri key const.

Trubnikov Sergey2022-07-19parent: #28af23e.patch.diff
in: master

2 files changed

modifiedpallets/common/src/erc.rsdiffbeforeafterboth
437 use alloc::format;437 use alloc::format;
438438
439 const EXPECT_CONVERT_ERROR: &str = "length < limit";439 const EXPECT_CONVERT_ERROR: &str = "length < limit";
440 /// Get the "tokenURI" key as [PropertyKey](up_data_structs::PropertyKey).
441 pub fn token_uri_key() -> up_data_structs::PropertyKey {
442 property_key_from_bytes(b"tokenURI").expect(EXPECT_CONVERT_ERROR)
443 }
444440
445 pub fn schema_name_key() -> up_data_structs::PropertyKey {441 pub fn schema_name_key() -> up_data_structs::PropertyKey {
446 property_key_from_bytes(b"schemaName").expect(EXPECT_CONVERT_ERROR)442 property_key_from_bytes(b"schemaName").expect(EXPECT_CONVERT_ERROR)
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -702,7 +702,7 @@
 		to: address,
 		tokens: Vec<(uint256, string)>,
 	) -> Result<bool> {
-		let key = token_uri_key();
+		let key = u_key();
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
 		let mut expected_index = <TokensMinted<T>>::get(self.id)