Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pallets/swap/src/pallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,18 +609,19 @@ mod pallet {
pub fn disable_lp(origin: OriginFor<T>) -> DispatchResult {
ensure_root(origin)?;

for netuid in 1..128 {
for netuid in 1..=128 {
let netuid = NetUid::from(netuid as u16);
if EnabledUserLiquidity::<T>::get(netuid) {
EnabledUserLiquidity::<T>::insert(netuid, false);
Self::deposit_event(Event::UserLiquidityToggled {
netuid,
enable: false,
});

// Remove provided liquidity
// Self::do_dissolve_all_liquidity_providers(netuid)?;
}

// Remove provided liquidity unconditionally because the network may have
// user liquidity previously disabled
Self::do_dissolve_all_liquidity_providers(netuid)?;
}

Ok(())
Expand Down
Loading