Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

develop to staging #141

Merged
merged 5 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions 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: 113,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -338,7 +338,7 @@ impl pallet_sudo::Config for Runtime {
parameter_types! {
pub Prefix: &'static [u8] = b"My JUR address is ";
pub const NativeCurrencyId: CurrencyId = NATIVE_CURRENCY_ID;
pub const EthAddress: EthereumAddress = EthereumAddress(hex!("D77229999a1ca62b5bfb2735BaC12069b3794c44"));
pub const EthAddress: EthereumAddress = EthereumAddress(hex!("37abc97DD3dA0b81fe635e35Ea1655A15FfF4d76"));
}

/// Configure the pallet-token-swap in pallets/token-swap.
Expand Down