Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
binyebarwe committed Dec 31, 2023
1 parent acbc8fb commit 4e88b8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions programs/openbook-v2/src/instructions/place_take_order.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use anchor_lang::prelude::*;
use num::complex::ComplexFloat;

use crate::accounts_ix::*;
use crate::accounts_zerocopy::AccountInfoRef;
Expand Down Expand Up @@ -66,13 +65,15 @@ pub fn place_take_order<'info>(

let (deposit_amount, withdraw_amount) = match side {
Side::Bid => {
let total_quote_including_fees = total_quote_taken_native + taker_fees - referrer_amount;
let total_quote_including_fees =
total_quote_taken_native + taker_fees - referrer_amount;
market.base_deposit_total -= total_base_taken_native;
market.quote_deposit_total += total_quote_including_fees;
(total_quote_including_fees, total_base_taken_native)
}
Side::Ask => {
let total_quote_discounting_fees = total_quote_taken_native - taker_fees + referrer_amount;
let total_quote_discounting_fees =
total_quote_taken_native - taker_fees + referrer_amount;
market.base_deposit_total += total_base_taken_native;
market.quote_deposit_total -= total_quote_discounting_fees;
(total_base_taken_native, total_quote_discounting_fees)
Expand Down

0 comments on commit 4e88b8b

Please sign in to comment.