Browse Source

Runtime: Add discussion_thread_id to ProposalCreated event

Leszek Wiesner 3 years ago
parent
commit
756045d5b3
2 changed files with 4 additions and 2 deletions
  1. 0 0
      chain-metadata.json
  2. 4 2
      runtime-modules/proposals/codex/src/lib.rs

File diff suppressed because it is too large
+ 0 - 0
chain-metadata.json


+ 4 - 2
runtime-modules/proposals/codex/src/lib.rs

@@ -260,13 +260,15 @@ decl_event! {
         GeneralProposalParameters = GeneralProposalParameters<T>,
         ProposalDetailsOf = ProposalDetailsOf<T>,
         <T as proposals_engine::Trait>::ProposalId,
+        <T as proposals_discussion::Trait>::ThreadId
     {
         /// A proposal was created
         /// Params:
         /// - Id of a newly created proposal after it was saved in storage.
         /// - General proposal parameter. Parameters shared by all proposals
         /// - Proposal Details. Parameter of proposal with a variant for each kind of proposal
-        ProposalCreated(ProposalId, GeneralProposalParameters, ProposalDetailsOf),
+        /// - Id of a newly created proposal thread
+        ProposalCreated(ProposalId, GeneralProposalParameters, ProposalDetailsOf, ThreadId),
     }
 }
 
@@ -515,7 +517,7 @@ decl_module! {
 
             <ThreadIdByProposalId<T>>::insert(proposal_id, discussion_thread_id);
 
-            Self::deposit_event(RawEvent::ProposalCreated(proposal_id, general_proposal_parameters, proposal_details));
+            Self::deposit_event(RawEvent::ProposalCreated(proposal_id, general_proposal_parameters, proposal_details, discussion_thread_id));
         }
     }
 }

Some files were not shown because too many files changed in this diff