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
298 fail!(<Error<T>>::FungibleDisallowsNesting)298 fail!(<Error<T>>::FungibleDisallowsNesting)
299 }299 }
300
301 fn nest(
302 &self,
303 _under: TokenId,
304 _to_nest: (CollectionId, TokenId)
305 ) {}
306
307 fn unnest(
308 &self,
309 _under: TokenId,
310 _to_nest: (CollectionId, TokenId)
311 ) {}
300312
301 fn collection_tokens(&self) -> Vec<TokenId> {313 fn collection_tokens(&self) -> Vec<TokenId> {
302 vec![TokenId::default()]314 vec![TokenId::default()]
modifiedpallets/refungible/src/common.rsdiffbeforeafterboth
313 fail!(<Error<T>>::RefungibleDisallowsNesting)313 fail!(<Error<T>>::RefungibleDisallowsNesting)
314 }314 }
315
316 fn nest(
317 &self,
318 _under: TokenId,
319 _to_nest: (CollectionId, TokenId)
320 ) {}
321
322 fn unnest(
323 &self,
324 _under: TokenId,
325 _to_nest: (CollectionId, TokenId)
326 ) {}
315327
316 fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId> {328 fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId> {
317 <Owned<T>>::iter_prefix((self.id, account))329 <Owned<T>>::iter_prefix((self.id, account))