Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Properly declare errors in pallets that use decl_module (#8523)
Browse files Browse the repository at this point in the history
* Properly declare errors in pallets that use decl_module

* Remove extra error type declaration
  • Loading branch information
KiChjang authored Apr 3, 2021
1 parent 52d5e19 commit d19c0e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frame/lottery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ decl_error! {

decl_module! {
pub struct Module<T: Config> for enum Call where origin: T::Origin, system = frame_system {
type Error = Error<T>;

const ModuleId: ModuleId = T::ModuleId::get();
const MaxCalls: u32 = T::MaxCalls::get() as u32;

Expand Down
2 changes: 2 additions & 0 deletions frame/membership/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ decl_module! {
for enum Call
where origin: T::Origin
{
type Error = Error<T, I>;

fn deposit_event() = default;

/// Add a member `who` to the set.
Expand Down
1 change: 0 additions & 1 deletion frame/tips/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ decl_module! {
for enum Call
where origin: T::Origin
{

/// The period for which a tip remains open after is has achieved threshold tippers.
const TipCountdown: T::BlockNumber = T::TipCountdown::get();

Expand Down

0 comments on commit d19c0e1

Please sign in to comment.