Skip to content
Merged
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
8 changes: 2 additions & 6 deletions pallets/subtensor/src/staking/order_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ impl<T: Config> OrderSwapInterface<T::AccountId> for Pallet<T> {
);
}
let alpha_out =
Self::stake_into_subnet(hotkey, coldkey, netuid, tao_amount, amm_limit, false, false)?;
if validate {
Self::set_stake_operation_limit(hotkey, coldkey, netuid);
}
Self::stake_into_subnet(hotkey, coldkey, netuid, tao_amount, amm_limit, false)?;

Ok(alpha_out)
}

Expand Down Expand Up @@ -136,7 +134,6 @@ impl<T: Config> OrderSwapInterface<T::AccountId> for Pallet<T> {
TaoBalance::from(tao_equiv) >= DefaultMinStake::<T>::get(),
Error::<T>::AmountTooLow
);
Self::ensure_stake_operation_limit_not_exceeded(from_hotkey, from_coldkey, netuid)?;
Self::ensure_available_to_unstake(from_coldkey, netuid, amount)?;
}

Expand All @@ -145,7 +142,6 @@ impl<T: Config> OrderSwapInterface<T::AccountId> for Pallet<T> {
Self::hotkey_account_exists(to_hotkey),
Error::<T>::HotKeyAccountNotExists
);
Self::set_stake_operation_limit(to_hotkey, to_coldkey, netuid);
}

let available =
Expand Down
Loading