diff --git a/pallets/subtensor/src/staking/stake_utils.rs b/pallets/subtensor/src/staking/stake_utils.rs index 2f9704a6b9..78f9c245db 100644 --- a/pallets/subtensor/src/staking/stake_utils.rs +++ b/pallets/subtensor/src/staking/stake_utils.rs @@ -968,7 +968,7 @@ impl Pallet { ensure!(Self::if_subnet_exist(netuid), Error::::SubnetNotExists); // Ensure that the subnet is enabled. - Self::ensure_subtoken_enabled(netuid)?; + // Self::ensure_subtoken_enabled(netuid)?; // Ensure that the stake amount to be removed is above the minimum in tao equivalent. if let Some(tao_equivalent) = Self::sim_swap_alpha_for_tao(netuid, alpha_unstaked) { diff --git a/pallets/subtensor/src/tests/subnet.rs b/pallets/subtensor/src/tests/subnet.rs index fdcaa00222..c95a841736 100644 --- a/pallets/subtensor/src/tests/subnet.rs +++ b/pallets/subtensor/src/tests/subnet.rs @@ -239,7 +239,9 @@ fn test_subtoken_enable() { }); } -// cargo test --package pallet-subtensor --lib -- tests::subnet::test_subtoken_enable_reject_trading_before_enable --exact --show-output +// cargo test --package pallet-subtensor --lib -- +// tests::subnet::test_subtoken_enable_reject_trading_before_enable --exact --show-output +#[allow(clippy::unwrap_used)] #[test] fn test_subtoken_enable_reject_trading_before_enable() { // ensure_subtoken_enabled @@ -340,17 +342,15 @@ fn test_subtoken_enable_reject_trading_before_enable() { stake_bal ); - assert_noop!( - SubtensorModule::remove_stake_limit( - RuntimeOrigin::signed(coldkey_account_id), - hotkey_account_id, - netuid, - amount, - limit_price, - false - ), - Error::::SubtokenDisabled - ); + SubtensorModule::remove_stake_limit( + RuntimeOrigin::signed(coldkey_account_id), + hotkey_account_id, + netuid, + amount, + limit_price, + false, + ) + .unwrap(); assert_noop!( SubtensorModule::remove_stake(