mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-12-02 15:27:06 +00:00
permit setting treasury pallet initial funding through genesis (#7214)
This commit is contained in:
1 parent
dbf4558633
commit
a2c4b38eb6
2 files changed
+25
-4
No files matched your search
@@ -396,10 +396,14 @@ decl_storage! {
|
||||
add_extra_genesis {
|
||||
build(|_config| {
|
||||
// Create Treasury account
|
||||
let _ = T::Currency::make_free_balance_be(
|
||||
&<Module<T, I>>::account_id(),
|
||||
T::Currency::minimum_balance(),
|
||||
);
|
||||
let account_id = <Module<T, I>>::account_id();
|
||||
let min = T::Currency::minimum_balance();
|
||||
if T::Currency::free_balance(&account_id) < min {
|
||||
let _ = T::Currency::make_free_balance_be(
|
||||
&account_id,
|
||||
min,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user