Add field names to pallet Event variants (#9993)

* convert pallet-assets events to struct types

* updated events of a couple pallets

* updated pallet event field names

* update pallet event field names

* updated events in test files

* cargo fmt

* minorfixes

* fix assertion error

* minor fix

* formatting fix

* fmt
This commit is contained in:
David Salami
2021-11-16 02:56:00 +01:00
committed by GitHub
parent fb3c7326c2
commit 120894fdb7
48 changed files with 1181 additions and 681 deletions
+5 -5
View File
@@ -164,8 +164,8 @@ fn emit_events_with_no_existential_deposit_suicide_with_dust() {
events(),
[
Event::System(system::Event::NewAccount(1)),
Event::Balances(crate::Event::Endowed(1, 100)),
Event::Balances(crate::Event::BalanceSet(1, 100, 0)),
Event::Balances(crate::Event::Endowed { account: 1, free_balance: 100 }),
Event::Balances(crate::Event::BalanceSet { who: 1, free: 100, reserved: 0 }),
]
);
@@ -173,7 +173,7 @@ fn emit_events_with_no_existential_deposit_suicide_with_dust() {
assert_eq!(res, (NegativeImbalance::new(98), 0));
// no events
assert_eq!(events(), [Event::Balances(crate::Event::Slashed(1, 98))]);
assert_eq!(events(), [Event::Balances(crate::Event::Slashed { who: 1, amount: 98 })]);
let res = Balances::slash(&1, 1);
assert_eq!(res, (NegativeImbalance::new(1), 0));
@@ -182,8 +182,8 @@ fn emit_events_with_no_existential_deposit_suicide_with_dust() {
events(),
[
Event::System(system::Event::KilledAccount(1)),
Event::Balances(crate::Event::DustLost(1, 1)),
Event::Balances(crate::Event::Slashed(1, 1)),
Event::Balances(crate::Event::DustLost { account: 1, amount: 1 }),
Event::Balances(crate::Event::Slashed { who: 1, amount: 1 })
]
);
});