Skip to content

Commit 7bee8b9

Browse files
committed
fix typo MaxResgistrationsAtTime
1 parent 7a8ec97 commit 7bee8b9

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

pallets/proxy/src/functions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl<T: Config> Pallet<T> {
270270
//TODO: Create a custom type for users bounded vec
271271
pub fn do_register_user(
272272
admin: T::AccountId,
273-
users: BoundedVec<(T::AccountId, FieldName, ProxyRole), T::MaxResgistrationsAtTime>,
273+
users: BoundedVec<(T::AccountId, FieldName, ProxyRole), T::MaxRegistrationsAtTime>,
274274
) -> DispatchResult {
275275
//ensure admin permissions
276276
Self::is_superuser(admin.clone(), &Self::get_global_scope(), ProxyRole::Administrator.id())?;
@@ -310,7 +310,7 @@ impl<T: Config> Pallet<T> {
310310
pub fn do_assign_user(
311311
admin: T::AccountId,
312312
project_id: [u8;32],
313-
users: BoundedVec<(T::AccountId, ProxyRole), T::MaxResgistrationsAtTime>,
313+
users: BoundedVec<(T::AccountId, ProxyRole), T::MaxRegistrationsAtTime>,
314314
) -> DispatchResult {
315315
//ensure admin permissions
316316
Self::is_superuser(admin.clone(), &Self::get_global_scope(), ProxyRole::Administrator.id())?;
@@ -515,7 +515,7 @@ impl<T: Config> Pallet<T> {
515515
Option<u64>,
516516
Option<u32>,
517517
Option<u32>,
518-
), T::MaxResgistrationsAtTime>,
518+
), T::MaxRegistrationsAtTime>,
519519
) -> DispatchResult {
520520
//ensure admin permissions
521521
Self::is_superuser(admin.clone(), &Self::get_global_scope(), ProxyRole::Administrator.id())?;

pallets/proxy/src/lib.rs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub mod pallet {
114114
type MaxTransactionsPerExpenditure: Get<u32>;
115115

116116
#[pallet::constant]
117-
type MaxResgistrationsAtTime: Get<u32>;
117+
type MaxRegistrationsAtTime: Get<u32>;
118118

119119

120120
}
@@ -480,7 +480,7 @@ pub mod pallet {
480480
#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]
481481
pub fn users_register_user(
482482
origin: OriginFor<T>,
483-
users: BoundedVec<(T::AccountId, FieldName, ProxyRole), T::MaxResgistrationsAtTime>,
483+
users: BoundedVec<(T::AccountId, FieldName, ProxyRole), T::MaxRegistrationsAtTime>,
484484
) -> DispatchResult {
485485
let who = ensure_signed(origin)?; // origin need to be an admin
486486

@@ -520,16 +520,27 @@ pub mod pallet {
520520
#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]
521521
pub fn projects_create_project(
522522
origin: OriginFor<T>,
523-
tittle: FieldName,
523+
title: FieldName,
524524
description: FieldDescription,
525525
image: CID,
526-
adress: FieldName,
526+
address: FieldName,
527527
project_type: ProjectType,
528-
completition_date: u64,
528+
completion_date: u64,
529+
expenditures: BoundedVec<(
530+
FieldName,
531+
ExpenditureType,
532+
Option<u64>,
533+
Option<u32>,
534+
Option<u32>,
535+
), T::MaxRegistrationsAtTime>,
536+
users: BoundedVec<(
537+
T::AccountId,
538+
ProxyRole
539+
), T::MaxRegistrationsAtTime>,
529540
) -> DispatchResult {
530541
let who = ensure_signed(origin)?; // origin need to be an admin
531542

532-
Self::do_create_project(who, tittle, description, image, adress, project_type, completition_date)
543+
Self::do_create_project(who, title, description, image, address, project_type, completion_date)
533544
}
534545

535546
#[transactional]
@@ -566,7 +577,7 @@ pub mod pallet {
566577
pub fn projects_assign_user(
567578
origin: OriginFor<T>,
568579
project_id: [u8;32],
569-
users: BoundedVec<(T::AccountId, ProxyRole), T::MaxResgistrationsAtTime>,
580+
users: BoundedVec<(T::AccountId, ProxyRole), T::MaxRegistrationsAtTime>,
570581
) -> DispatchResult {
571582
let who = ensure_signed(origin)?; // origin need to be an admin
572583

@@ -600,7 +611,7 @@ pub mod pallet {
600611
Option<u64>,
601612
Option<u32>,
602613
Option<u32>,
603-
), T::MaxResgistrationsAtTime>,
614+
), T::MaxRegistrationsAtTime>,
604615
) -> DispatchResult {
605616
let who = ensure_signed(origin)?; // origin need to be an admin
606617

pallets/proxy/src/mock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ parameter_types! {
7777
pub const MaxTransactionsPerProject:u32 = 1000;
7878
pub const MaxTransactionsPerDrawdown:u32 = 500;
7979
pub const MaxTransactionsPerExpenditure:u32 = 500;
80-
pub const MaxResgistrationsAtTime:u32 = 50;
80+
pub const MaxRegistrationsAtTime:u32 = 50;
8181

8282
}
8383

@@ -102,7 +102,7 @@ impl pallet_proxy::Config for Test {
102102
type MaxTransactionsPerProject = MaxTransactionsPerProject;
103103
type MaxTransactionsPerDrawdown = MaxTransactionsPerDrawdown;
104104
type MaxTransactionsPerExpenditure = MaxTransactionsPerExpenditure;
105-
type MaxResgistrationsAtTime = MaxResgistrationsAtTime;
105+
type MaxRegistrationsAtTime = MaxRegistrationsAtTime;
106106

107107
type Timestamp = Timestamp;
108108
type Moment = u64;

runtime/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ parameter_types! {
565565
pub const MaxTransactionsPerProject:u32 = 1000;
566566
pub const MaxTransactionsPerDrawdown:u32 = 500;
567567
pub const MaxTransactionsPerExpenditure:u32 = 500;
568-
pub const MaxResgistrationsAtTime:u32 = 50;
568+
pub const MaxRegistrationsAtTime:u32 = 50;
569569

570570

571571
}
@@ -597,7 +597,7 @@ impl pallet_proxy::Config for Runtime {
597597
type MaxTransactionsPerProject = MaxTransactionsPerProject;
598598
type MaxTransactionsPerDrawdown = MaxTransactionsPerDrawdown;
599599
type MaxTransactionsPerExpenditure = MaxTransactionsPerExpenditure;
600-
type MaxResgistrationsAtTime = MaxResgistrationsAtTime;
600+
type MaxRegistrationsAtTime = MaxRegistrationsAtTime;
601601

602602
}
603603

0 commit comments

Comments
 (0)