From bb64e8b60176d61ab53eaa21ec6f3dc0927f8ca3 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Fri, 27 May 2022 13:14:34 +0000 Subject: [PATCH] refactor: don't use default impl in common ops --- --- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -1239,15 +1239,15 @@ fn nest( &self, - _under: TokenId, - _to_nest: (CollectionId, TokenId) - ) {} + under: TokenId, + to_nest: (CollectionId, TokenId) + ); fn unnest( &self, - _under: TokenId, - _to_nest: (CollectionId, TokenId) - ) {} + under: TokenId, + to_nest: (CollectionId, TokenId) + ); fn account_tokens(&self, account: T::CrossAccountId) -> Vec; fn collection_tokens(&self) -> Vec; --- a/pallets/fungible/src/common.rs +++ b/pallets/fungible/src/common.rs @@ -298,6 +298,18 @@ fail!(>::FungibleDisallowsNesting) } + fn nest( + &self, + _under: TokenId, + _to_nest: (CollectionId, TokenId) + ) {} + + fn unnest( + &self, + _under: TokenId, + _to_nest: (CollectionId, TokenId) + ) {} + fn collection_tokens(&self) -> Vec { vec![TokenId::default()] } --- a/pallets/refungible/src/common.rs +++ b/pallets/refungible/src/common.rs @@ -313,6 +313,18 @@ fail!(>::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 { >::iter_prefix((self.id, account)) .map(|(id, _)| id) -- gitstuff