Skip to content

Commit

Permalink
fix price
Browse files Browse the repository at this point in the history
  • Loading branch information
lehieuhust committed Jan 30, 2024
1 parent 86720e3 commit 2a5a9f1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions contracts/oraiswap_limit_order/src/orderbook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ impl Order {
) -> Self {
let offer_amount = match direction {
OrderDirection::Buy => ask_amount * price,
OrderDirection::Sell => Uint128::from(ask_amount * Uint128::from(1000000u128))
.checked_div(price * Uint128::from(1000000u128))
.unwrap(),
OrderDirection::Sell => ask_amount * (Decimal::one() / price),
};

Order {
Expand Down

0 comments on commit 2a5a9f1

Please sign in to comment.