-
Notifications
You must be signed in to change notification settings - Fork 359
Open
Description
The instruction accepts an u64:
serum-dex/dex/src/instruction.rs
Line 434 in 0c23a51
| CancelOrderByClientIdV2(u64), |
despite it being casted to a
NonZeroU64 internally:Line 2127 in 0c23a51
| let client_order_id = NonZeroU64::new(client_order_id).ok_or(assertion_error!())?; |
which means that an order with client id of 0 can not be cancelled (raising an assertion error).
This is also an issue for the CancelOrdersByClientIds instruction, worst yet it silently filters away the 0 id order:
Lines 2190 to 2194 in 0c23a51
| let client_order_ids = client_order_ids | |
| .iter() | |
| .cloned() | |
| .filter_map(NonZeroU64::new) | |
| .collect::<Vec<NonZeroU64>>(); |
Causing confusing errors like insufficient funds.
Metadata
Metadata
Assignees
Labels
No labels