Skip to content

Commit c18fb70

Browse files
committed
program: fix cargo tests
1 parent 8b6404f commit c18fb70

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

programs/drift/src/math/orders.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,8 +1423,10 @@ pub fn calculate_existing_position_fields_for_order_action(
14231423
} else {
14241424
return Ok((
14251425
Some(quote_entry_amount
1426-
.safe_mul(base_asset_amount_filled)?
1427-
.safe_div(base_asset_amount)?),
1426+
.cast::<u128>()?
1427+
.safe_mul(base_asset_amount_filled.cast()?)?
1428+
.safe_div(base_asset_amount.cast()?)?
1429+
.cast::<u64>()?),
14281430
None,
14291431
));
14301432
}

programs/drift/src/state/events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ pub struct OrderActionRecord {
257257
}
258258

259259
impl Size for OrderActionRecord {
260-
const SIZE: usize = 416;
260+
const SIZE: usize = 448;
261261
}
262262

263263
pub fn get_order_action_record(

0 commit comments

Comments
 (0)