Skip to content
Snippets Groups Projects
Commit 681c10cc authored by Pascal Engélibert's avatar Pascal Engélibert :bicyclist:
Browse files

use FirstEligibleUd::min

parent 1f18c5bc
No related branches found
No related tags found
1 merge request!304Disable UD for non-members at genesis
Pipeline #39523 passed
...@@ -200,7 +200,9 @@ fn genesis_data_to_g1_genesis_conf( ...@@ -200,7 +200,9 @@ fn genesis_data_to_g1_genesis_conf(
value: common_runtime::IdtyValue { value: common_runtime::IdtyValue {
data: IdtyData { data: IdtyData {
first_eligible_ud: match status { first_eligible_ud: match status {
common_runtime::IdtyStatus::Member => 1_u16.into(), // Only members are eligible to UD.
// The first claimable UD has the minimum index (1).
common_runtime::IdtyStatus::Member => g1_runtime::pallet_universal_dividend::FirstEligibleUd::min(),
_ => g1_runtime::pallet_universal_dividend::FirstEligibleUd(None), _ => g1_runtime::pallet_universal_dividend::FirstEligibleUd(None),
} }
}, },
......
...@@ -288,7 +288,9 @@ fn genesis_data_to_gdev_genesis_conf( ...@@ -288,7 +288,9 @@ fn genesis_data_to_gdev_genesis_conf(
value: common_runtime::IdtyValue { value: common_runtime::IdtyValue {
data: IdtyData { data: IdtyData {
first_eligible_ud: match status { first_eligible_ud: match status {
common_runtime::IdtyStatus::Member => 1_u16.into(), // Only members are eligible to UD.
// The first claimable UD has the minimum index (1).
common_runtime::IdtyStatus::Member => gdev_runtime::pallet_universal_dividend::FirstEligibleUd::min(),
_ => gdev_runtime::pallet_universal_dividend::FirstEligibleUd(None), _ => gdev_runtime::pallet_universal_dividend::FirstEligibleUd(None),
} }
}, },
......
...@@ -293,7 +293,9 @@ fn genesis_data_to_gtest_genesis_conf( ...@@ -293,7 +293,9 @@ fn genesis_data_to_gtest_genesis_conf(
value: common_runtime::IdtyValue { value: common_runtime::IdtyValue {
data: IdtyData { data: IdtyData {
first_eligible_ud: match status { first_eligible_ud: match status {
common_runtime::IdtyStatus::Member => 1_u16.into(), // Only members are eligible to UD.
// The first claimable UD has the minimum index (1).
common_runtime::IdtyStatus::Member => gtest_runtime::pallet_universal_dividend::FirstEligibleUd::min(),
_ => gtest_runtime::pallet_universal_dividend::FirstEligibleUd(None), _ => gtest_runtime::pallet_universal_dividend::FirstEligibleUd(None),
} }
}, },
......
...@@ -224,7 +224,7 @@ impl ExtBuilder { ...@@ -224,7 +224,7 @@ impl ExtBuilder {
name: name.clone(), name: name.clone(),
value: IdtyValue { value: IdtyValue {
data: IdtyData { data: IdtyData {
first_eligible_ud: 1_u16.into(), first_eligible_ud: pallet_universal_dividend::FirstEligibleUd::min(),
}, },
next_creatable_identity_on: Default::default(), next_creatable_identity_on: Default::default(),
owner_key: owner_key.clone(), owner_key: owner_key.clone(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment