We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b6404f commit c18fb70Copy full SHA for c18fb70
programs/drift/src/math/orders.rs
@@ -1423,8 +1423,10 @@ pub fn calculate_existing_position_fields_for_order_action(
1423
} else {
1424
return Ok((
1425
Some(quote_entry_amount
1426
- .safe_mul(base_asset_amount_filled)?
1427
- .safe_div(base_asset_amount)?),
+ .cast::<u128>()?
+ .safe_mul(base_asset_amount_filled.cast()?)?
1428
+ .safe_div(base_asset_amount.cast()?)?
1429
+ .cast::<u64>()?),
1430
None,
1431
));
1432
}
programs/drift/src/state/events.rs
@@ -257,7 +257,7 @@ pub struct OrderActionRecord {
257
258
259
impl Size for OrderActionRecord {
260
- const SIZE: usize = 416;
+ const SIZE: usize = 448;
261
262
263
pub fn get_order_action_record(
0 commit comments