Skip to content

Commit

Permalink
fix: Store matching fee and trader pnl into trade params
Browse files Browse the repository at this point in the history
  • Loading branch information
holzeis committed Apr 26, 2024
1 parent 86f3334 commit 20165d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coordinator/src/db/trade_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ pub(crate) fn insert(
trade_params::trader_pubkey.eq(params.trader.to_string()),
trade_params::direction.eq(Direction::from(params.direction)),
trade_params::average_price.eq(params.average_price),
trade_params::matching_fee.eq(params.matching_fee.to_sat() as i64),
trade_params::trader_pnl_sat.eq(params.trader_pnl.map(|pnl| pnl.to_sat())),
))
.execute(conn)?;

Expand Down

0 comments on commit 20165d1

Please sign in to comment.