From 6bc63c8e778be0b5cab3d0777dd301e876a1df0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Andr=C3=A9s=20Dorado=20Su=C3=A1rez?= Date: Tue, 23 Apr 2024 11:11:32 -0500 Subject: [PATCH] feat(pallet-communities-manager): add maybe_track_info parameter --- pallets/communities-manager/src/lib.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pallets/communities-manager/src/lib.rs b/pallets/communities-manager/src/lib.rs index 0da41073..3d1d54ee 100644 --- a/pallets/communities-manager/src/lib.rs +++ b/pallets/communities-manager/src/lib.rs @@ -20,10 +20,7 @@ use frame_support::{ }; use frame_system::pallet_prelude::{BlockNumberFor, OriginFor}; use pallet_communities::{ - types::{ - AccountIdLookupOf, AccountIdOf, CommunityIdOf, DecisionMethodFor, NativeBalanceOf, PalletsOriginOf, - RuntimeOriginFor, - }, + types::{AccountIdOf, CommunityIdOf, DecisionMethodFor, NativeBalanceOf, PalletsOriginOf, RuntimeOriginFor}, Origin as CommunityOrigin, }; use pallet_nfts::CollectionConfig; @@ -105,7 +102,8 @@ pub mod pallet { name: CommunityName, maybe_admin_origin: Option>, maybe_decision_method: Option>, - _maybe_first_member: Option>, + maybe_track_info: Option>, + // _maybe_first_member: Option>, ) -> DispatchResult { let maybe_deposit = T::CreateOrigin::ensure_origin(origin)?; @@ -140,7 +138,7 @@ pub mod pallet { // Create governance track for community T::Tracks::insert( community_id, - Self::default_tack(community_name), + maybe_track_info.unwrap_or(Self::default_tack(community_name)), community_origin.into_caller(), )?; // Induct community at Kreivo Governance with rank 1