Skip to content
Closed
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
6 changes: 6 additions & 0 deletions pallets/subtensor/src/staking/add_stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ impl<T: Config> Pallet<T> {
)?;
}

Self::ensure_subtoken_enabled(netuid)?;

// Save the staking job for the on_finalize
let stake_job = StakeJob::AddStake {
hotkey,
Expand Down Expand Up @@ -211,6 +213,8 @@ impl<T: Config> Pallet<T> {
)?;
}

Self::ensure_subtoken_enabled(netuid)?;

let stake_job = StakeJob::AddStakeLimit {
hotkey,
coldkey,
Expand Down Expand Up @@ -287,6 +291,8 @@ impl<T: Config> Pallet<T> {
stake_to_be_added
);

Self::ensure_subtoken_enabled(netuid)?;

// 2. Calculate the maximum amount that can be executed with price limit
let max_amount = Self::get_max_amount_add(netuid, limit_price)?;
let mut possible_stake = stake_to_be_added;
Expand Down
Loading