Please add the labels corresponding to the type of changes your PR introduces:
Bugfix
What is the current behavior?
If the index isn't found in remove_* function, then offsetted_index == 0 and panic with u32_sub Overflow in the instruction let index = offsetted_index - 1;.
What is the new behavior?
If the index isn't found in remove_* function, then offsetted_index == 0 and panic with MarketError::MARKET_NOT_FOUND.
Pull Request type
Please add the labels corresponding to the type of changes your PR introduces:
What is the current behavior?
If the index isn't found in
remove_*
function, thenoffsetted_index == 0
and panic withu32_sub Overflow
in the instructionlet index = offsetted_index - 1;
.What is the new behavior?
If the index isn't found in
remove_*
function, thenoffsetted_index == 0
and panic withMarketError::MARKET_NOT_FOUND
.Does this introduce a breaking change?
No
Other information