Skip to content

Commit

Permalink
Merge pull request #142 from jurteam/release/v2.0.2
Browse files Browse the repository at this point in the history
Release 2.0.2
  • Loading branch information
Alessio Treglia authored Aug 25, 2023
2 parents d7d41bc + 9539bdf commit 79976f8
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 17 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jur-node"
version = "2.0.1"
version = "2.0.2"
edition = "2021"
license = "Unlicense"
publish = false
Expand Down Expand Up @@ -55,7 +55,7 @@ frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/parityte
frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }

# Local Dependencies
jur-node-runtime = { version = "2.0.1", path = "../runtime" }
jur-node-runtime = { version = "2.0.2", path = "../runtime" }
primitives = { package = 'jur-primitives', path = '../primitives' }

# CLI-specific dependencies
Expand Down
2 changes: 1 addition & 1 deletion pallets/community/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ benchmarks! {
Some("#E76080".into())
).unwrap();

let member: T::AccountId = whitelisted_caller();
let member: T::AccountId = account("sub", 2, SEED);

}: _(
RawOrigin::Signed(member), T::Helper::community(1)
Expand Down
3 changes: 3 additions & 0 deletions pallets/community/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ pub mod pallet {

let mut community_members = community.members.clone();

ensure!(community.founder != member, Error::<T>::AlreadyMember);

ensure!(!community_members.contains(&member), Error::<T>::AlreadyMember);

community_members.push(member.clone());

community.members = community_members;
Expand Down
4 changes: 2 additions & 2 deletions pallets/passport/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ benchmarks! {
)
verify {
assert_last_event::<T>(Event::<T>::MintedPassport(
<T as pallet::Config>::Helper::passport(4851)
<T as pallet::Config>::Helper::passport(5001)
).into());
}

Expand All @@ -104,7 +104,7 @@ benchmarks! {
}: _(RawOrigin::Signed(member), community_id, bounded_passport_address)
verify {
assert_last_event::<T>(Event::<T>::UpdatedPassport(
<T as pallet::Config>::Helper::passport(4851)
<T as pallet::Config>::Helper::passport(5001)
).into());
}

Expand Down
2 changes: 1 addition & 1 deletion pallets/passport/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn mint_passport_works_for_founder() {
add_founder();
create_community();
assert_ok!(Passport::mint(RuntimeOrigin::signed(1), 1));
assert_eq!(Passports::<Test>::get(1, 1).unwrap().id, 4851);
assert_eq!(Passports::<Test>::get(1, 1).unwrap().id, 5001);
create_community();
assert_ok!(Passport::mint(RuntimeOrigin::signed(1), 2));
assert_eq!(Passports::<Test>::get(2, 1).unwrap().id, 1);
Expand Down
6 changes: 3 additions & 3 deletions pallets/user/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ pub mod pallet {
}

// Validating the duplicate username
for (_, userdata) in Users::<T>::iter() {
for (account, userdata) in Users::<T>::iter() {
ensure!(
userdata.name != name || userdata.name == None,
Error::<T>::UsernameNotAvailable
userdata.name != name || userdata.name == None ||
( account == user && userdata.name == name),Error::<T>::UsernameNotAvailable
);
}

Expand Down
2 changes: 1 addition & 1 deletion pallets/user/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn update_user_not_works_with_existing_name() {
);
assert_noop!(
User::update_user(
RuntimeOrigin::signed(1),
RuntimeOrigin::signed(2),
Some("Alice".as_bytes().to_vec().try_into().unwrap()),
Some("avatar".as_bytes().to_vec().try_into().unwrap())
),
Expand Down
2 changes: 1 addition & 1 deletion primitives/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ macro_rules! impl_incrementable {
}

fn jur_community_reserve_slots() -> Self {
4851
5001
}
}
)+
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jur-node-runtime"
version = "2.0.1"
version = "2.0.2"
edition = "2021"
license = "Unlicense"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 105,
spec_version: 106,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit 79976f8

Please sign in to comment.