git.delta.rocks / unique-network / refs/commits / bb64e8b60176

difftreelog

refactor don't use default impl in common ops

Daniel Shiposha2022-05-27parent: #274525a.patch.diff
in: master

3 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
12391239
1240 fn nest(1240 fn nest(
1241 &self,1241 &self,
1242 _under: TokenId,1242 under: TokenId,
1243 _to_nest: (CollectionId, TokenId)1243 to_nest: (CollectionId, TokenId)
1244 ) {}1244 );
12451245
1246 fn unnest(1246 fn unnest(
1247 &self,1247 &self,
1248 _under: TokenId,1248 under: TokenId,
1249 _to_nest: (CollectionId, TokenId)1249 to_nest: (CollectionId, TokenId)
1250 ) {}1250 );
12511251
1252 fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;1252 fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;
1253 fn collection_tokens(&self) -> Vec<TokenId>;1253 fn collection_tokens(&self) -> Vec<TokenId>;
modifiedpallets/fungible/src/common.rsdiffbeforeafterboth
--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -298,6 +298,18 @@
 		fail!(<Error<T>>::FungibleDisallowsNesting)
 	}
 
+	fn nest(
+		&self,
+		_under: TokenId,
+		_to_nest: (CollectionId, TokenId)
+	) {}
+
+	fn unnest(
+		&self,
+		_under: TokenId,
+		_to_nest: (CollectionId, TokenId)
+	) {}
+
 	fn collection_tokens(&self) -> Vec<TokenId> {
 		vec![TokenId::default()]
 	}
modifiedpallets/refungible/src/common.rsdiffbeforeafterboth
--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -313,6 +313,18 @@
 		fail!(<Error<T>>::RefungibleDisallowsNesting)
 	}
 
+	fn nest(
+		&self,
+		_under: TokenId,
+		_to_nest: (CollectionId, TokenId)
+	) {}
+
+	fn unnest(
+		&self,
+		_under: TokenId,
+		_to_nest: (CollectionId, TokenId)
+	) {}
+
 	fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId> {
 		<Owned<T>>::iter_prefix((self.id, account))
 			.map(|(id, _)| id)