mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 07:51:07 +00:00
OpenGov improvements for Kusama (#6372)
* Tweaks to optimise gov2 * Use new inactive funds * Introduce migrations * Fixes * Fixes * Fixes * Some constant updates for Fellowship * Further tweaks * Lower floor for whitelisted
This commit is contained in:
@@ -51,6 +51,8 @@
|
||||
|
||||
pub mod migration;
|
||||
|
||||
// TODO: Expose the total amount held.
|
||||
|
||||
use crate::{
|
||||
slot_range::SlotRange,
|
||||
traits::{Auctioneer, Registrar},
|
||||
@@ -488,6 +490,7 @@ pub mod pallet {
|
||||
ensure!(balance > Zero::zero(), Error::<T>::NoContributions);
|
||||
|
||||
CurrencyOf::<T>::transfer(&fund_account, &who, balance, AllowDeath)?;
|
||||
CurrencyOf::<T>::reactivate(balance);
|
||||
|
||||
Self::contribution_kill(fund.fund_index, &who);
|
||||
fund.raised = fund.raised.saturating_sub(balance);
|
||||
@@ -527,6 +530,7 @@ pub mod pallet {
|
||||
break
|
||||
}
|
||||
CurrencyOf::<T>::transfer(&fund_account, &who, balance, AllowDeath)?;
|
||||
CurrencyOf::<T>::reactivate(balance);
|
||||
Self::contribution_kill(fund.fund_index, &who);
|
||||
fund.raised = fund.raised.saturating_sub(balance);
|
||||
refund_count += 1;
|
||||
@@ -777,6 +781,7 @@ impl<T: Config> Pallet<T> {
|
||||
}
|
||||
|
||||
CurrencyOf::<T>::transfer(&who, &fund_account, value, existence)?;
|
||||
CurrencyOf::<T>::deactivate(value);
|
||||
|
||||
let balance = old_balance.saturating_add(value);
|
||||
Self::contribution_put(fund.fund_index, &who, &balance, &memo);
|
||||
|
||||
Reference in New Issue
Block a user