Skip to content

Commit

Permalink
Network fee
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Mar 5, 2024
1 parent 287c1f9 commit 08c7027
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crates/driver/src/tests/cases/protocol_fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async fn price_improvement_fee_buy_out_of_market_order() {
quote: PriceImprovementQuote {
sell_amount: 50000000000000000000u128.into(),
buy_amount: 35000000000000000000u128.into(),
fee: 1000000000000000000u128.into(),
network_fee: 1000000000000000000u128.into(),
},
};
let order_sell_amount = 50000000000000000000u128.into();
Expand Down Expand Up @@ -227,7 +227,7 @@ async fn price_improvement_fee_sell_out_of_market_order() {
quote: PriceImprovementQuote {
sell_amount: 50000000000000000000u128.into(),
buy_amount: 35000000000000000000u128.into(),
fee: 1000000000000000000u128.into(),
network_fee: 1000000000000000000u128.into(),
},
};
let order_sell_amount = 50000000000000000000u128.into();
Expand Down Expand Up @@ -257,7 +257,7 @@ async fn price_improvement_fee_buy_in_market_order() {
quote: PriceImprovementQuote {
sell_amount: 50000000000000000000u128.into(),
buy_amount: 40000000000000000000u128.into(),
fee: 1000000000000000000u128.into(),
network_fee: 1000000000000000000u128.into(),
},
};
let order_sell_amount = 50000000000000000000u128.into();
Expand Down Expand Up @@ -286,7 +286,7 @@ async fn price_improvement_fee_sell_in_market_order() {
quote: PriceImprovementQuote {
sell_amount: 50000000000000000000u128.into(),
buy_amount: 40000000000000000000u128.into(),
fee: 1000000000000000000u128.into(),
network_fee: 1000000000000000000u128.into(),
},
};
let order_sell_amount: eth::U256 = 50000000000000000000u128.into();
Expand Down
4 changes: 2 additions & 2 deletions crates/driver/src/tests/setup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub enum Score {
pub struct PriceImprovementQuote {
pub buy_amount: eth::U256,
pub sell_amount: eth::U256,
pub fee: eth::U256,
pub network_fee: eth::U256,
}

#[serde_as]
Expand Down Expand Up @@ -120,7 +120,7 @@ impl FeePolicy {
"quote": {
"sellAmount": quote.sell_amount,
"buyAmount": quote.buy_amount,
"fee": quote.fee,
"fee": quote.network_fee,
}
}
}),
Expand Down

0 comments on commit 08c7027

Please sign in to comment.