Removed pallet::getter usage from pallet-collective (#3456)

Part of #3326 
This one is easier as all the storage items are public. 

@ggwpez @kianenigma @shawntabrizi

---------

Signed-off-by: Matteo Muraca <mmuraca247@gmail.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: command-bot <>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Matteo Muraca
2024-03-05 12:04:11 +01:00
committed by GitHub
parent 3ff78a7888
commit a71f018c7a
8 changed files with 94 additions and 85 deletions
+1 -1
View File
@@ -208,7 +208,7 @@ impl ProposalProvider<AccountId, H256, RuntimeCall> for AllianceProposalProvider
}
fn proposal_of(proposal_hash: H256) -> Option<RuntimeCall> {
AllianceMotion::proposal_of(proposal_hash)
pallet_collective::ProposalOf::<Test, Instance1>::get(proposal_hash)
}
}
+2 -2
View File
@@ -187,8 +187,8 @@ fn propose_works() {
Box::new(proposal.clone()),
proposal_len
));
assert_eq!(*AllianceMotion::proposals(), vec![hash]);
assert_eq!(AllianceMotion::proposal_of(&hash), Some(proposal));
assert_eq!(*pallet_collective::Proposals::<Test, Instance1>::get(), vec![hash]);
assert_eq!(pallet_collective::ProposalOf::<Test, Instance1>::get(&hash), Some(proposal));
assert_eq!(
System::events(),
vec![EventRecord {