File tree 3 files changed +7
-9
lines changed
3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ impl ExtBuilder {
167
167
. unwrap ( ) ;
168
168
169
169
orml_tokens:: GenesisConfig :: < Runtime > {
170
- endowed_accounts : self
170
+ balances : self
171
171
. endowed_accounts
172
172
. into_iter ( )
173
173
. filter ( |( _, currency_id, _) | * currency_id != NATIVE_CURRENCY_ID )
Original file line number Diff line number Diff line change @@ -262,15 +262,13 @@ pub mod module {
262
262
263
263
#[ pallet:: genesis_config]
264
264
pub struct GenesisConfig < T : Config > {
265
- pub endowed_accounts : Vec < ( T :: AccountId , T :: CurrencyId , T :: Balance ) > ,
265
+ pub balances : Vec < ( T :: AccountId , T :: CurrencyId , T :: Balance ) > ,
266
266
}
267
267
268
268
#[ cfg( feature = "std" ) ]
269
269
impl < T : Config > Default for GenesisConfig < T > {
270
270
fn default ( ) -> Self {
271
- GenesisConfig {
272
- endowed_accounts : vec ! [ ] ,
273
- }
271
+ GenesisConfig { balances : vec ! [ ] }
274
272
}
275
273
}
276
274
@@ -279,16 +277,16 @@ pub mod module {
279
277
fn build ( & self ) {
280
278
// ensure no duplicates exist.
281
279
let unique_endowed_accounts = self
282
- . endowed_accounts
280
+ . balances
283
281
. iter ( )
284
282
. map ( |( account_id, currency_id, _) | ( account_id, currency_id) )
285
283
. collect :: < std:: collections:: BTreeSet < _ > > ( ) ;
286
284
assert ! (
287
- unique_endowed_accounts. len( ) == self . endowed_accounts . len( ) ,
285
+ unique_endowed_accounts. len( ) == self . balances . len( ) ,
288
286
"duplicate endowed accounts in genesis."
289
287
) ;
290
288
291
- self . endowed_accounts
289
+ self . balances
292
290
. iter ( )
293
291
. for_each ( |( account_id, currency_id, initial_balance) | {
294
292
assert ! (
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ impl ExtBuilder {
274
274
. unwrap ( ) ;
275
275
276
276
tokens:: GenesisConfig :: < Runtime > {
277
- endowed_accounts : self . endowed_accounts ,
277
+ balances : self . endowed_accounts ,
278
278
}
279
279
. assimilate_storage ( & mut t)
280
280
. unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments