Skip to content
Snippets Groups Projects
Unverified Commit 35a3ac39 authored by bgallois's avatar bgallois
Browse files

fix initial balance

parent 9b94d8fb
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ impl ExtBuilder {
(
get_account_id_from_seed::<sr25519::Public>(NAMES[i]),
GenesisAccountData {
balance: 0,
balance: 1_000,
is_identity: true,
random_id: H256([i as u8; 32]),
},
......@@ -179,7 +179,7 @@ impl ExtBuilder {
pallet_balances::GenesisConfig::<Runtime> {
balances: initial_accounts
.iter()
.map(|(key, balance)| (key.clone(), balance.balance.clone()))
.map(|(key, balance)| (key.clone(), balance.balance))
.collect(),
}
.assimilate_storage(&mut t)
......@@ -279,8 +279,8 @@ impl ExtBuilder {
first_reeval: 100,
first_ud: 1_000,
initial_monetary_mass: initial_accounts
.iter()
.map(|(_, balance)| balance.balance.clone())
.values()
.map(|balance| balance.balance)
.sum(),
}
.assimilate_storage(&mut t)
......
......@@ -241,7 +241,7 @@ fn test_remove_identity_after_one_ud() {
assert!(Identity::identity(4).is_none());
assert_eq!(
Balances::free_balance(AccountKeyring::Dave.to_account_id()),
1_000
2_000
);
});
}
......@@ -261,10 +261,10 @@ fn test_ud_claimed_membership_on_and_off() {
members_count: 4,
},
));
// UD not claimed, still initial balance to 0
// UD not claimed, still initial balance to initial 1000
assert_eq!(
Balances::free_balance(AccountKeyring::Alice.to_account_id()),
0
1_000
);
run_to_block(11);
......@@ -280,7 +280,7 @@ fn test_ud_claimed_membership_on_and_off() {
// alice balances should be increased by 1 UD
assert_eq!(
Balances::free_balance(AccountKeyring::Alice.to_account_id()),
1000
2000
);
// UD number 2
......@@ -327,7 +327,7 @@ fn test_ud_claimed_membership_on_and_off() {
));
assert_eq!(
Balances::free_balance(AccountKeyring::Alice.to_account_id()),
2000 // one more UD
3000 // one more UD
);
// println!("{:?}", System::events());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment