Properly declare errors in pallets that use decl_module (#8523)

* Properly declare errors in pallets that use decl_module

* Remove extra error type declaration
This commit is contained in:
Keith Yeung
2021-04-03 13:06:25 -07:00
committed by GitHub
parent 35acdbc16f
commit b2db0ff881
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -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;
+2
View File
@@ -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.
-1
View File
@@ -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();