mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 23:01:08 +00:00
Generalised proxies (#6156)
* Initial work * It should work * Fix node * Fix tests * Initial test * Tests * Expunge proxy functionality from democracy and elections * Allow different proxy types * Repotted * Build * Build * Making a start on weights * Undo breaking change * Line widths. * Fix * fix tests * finish benchmarks? * Storage name! * Utility -> Proxy * proxy weight * add proxy weight * remove weights * Update transfer constraint * Again, fix constraints * Fix negation * Update frame/proxy/Cargo.toml Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Remove unneeded event. * Grumbles * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -1257,12 +1257,9 @@ where
|
||||
) {
|
||||
if amount.is_zero() || reasons.is_none() { return }
|
||||
let mut new_lock = Some(BalanceLock { id, amount, reasons: reasons.into() });
|
||||
let mut locks = Self::locks(who).into_iter().filter_map(|l|
|
||||
if l.id == id {
|
||||
new_lock.take()
|
||||
} else {
|
||||
Some(l)
|
||||
}).collect::<Vec<_>>();
|
||||
let mut locks = Self::locks(who).into_iter()
|
||||
.filter_map(|l| if l.id == id { new_lock.take() } else { Some(l) })
|
||||
.collect::<Vec<_>>();
|
||||
if let Some(lock) = new_lock {
|
||||
locks.push(lock)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user