Skip to content

Commit a2558f0

Browse files
authored
Merge branch 'devnet-ready' into mevshield-transaction-extension
2 parents ef01a93 + f491ce7 commit a2558f0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pallets/swap/src/pallet/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,18 +609,19 @@ mod pallet {
609609
pub fn disable_lp(origin: OriginFor<T>) -> DispatchResult {
610610
ensure_root(origin)?;
611611

612-
for netuid in 1..128 {
612+
for netuid in 1..=128 {
613613
let netuid = NetUid::from(netuid as u16);
614614
if EnabledUserLiquidity::<T>::get(netuid) {
615615
EnabledUserLiquidity::<T>::insert(netuid, false);
616616
Self::deposit_event(Event::UserLiquidityToggled {
617617
netuid,
618618
enable: false,
619619
});
620-
621-
// Remove provided liquidity
622-
// Self::do_dissolve_all_liquidity_providers(netuid)?;
623620
}
621+
622+
// Remove provided liquidity unconditionally because the network may have
623+
// user liquidity previously disabled
624+
Self::do_dissolve_all_liquidity_providers(netuid)?;
624625
}
625626

626627
Ok(())

0 commit comments

Comments
 (0)