Skip to content

Commit

Permalink
Merge pull request #45 from oraichain/hotfix/change-format-pair-submi…
Browse files Browse the repository at this point in the history
…t-order

hotfix: change format emit pair in submit order
  • Loading branch information
tubackkhoa authored Mar 12, 2024
2 parents 08b7369 + 47c21dd commit 3762086
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions contracts/oraiswap_limit_order/src/order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ pub fn submit_order(
}
};

let pair = format!(
"{} - {}",
&orderbook_pair.base_coin_info.to_normal(deps.api)?,
&orderbook_pair.quote_coin_info.to_normal(deps.api)?
);

let response = if matched {
process_matching(deps, sender.clone(), orderbook_pair, order_id, price)?
} else {
Expand All @@ -90,10 +96,7 @@ pub fn submit_order(
Ok(response.add_attributes(vec![
("action", "submit_order"),
("order_type", "limit"),
(
"pair",
&format!("{} - {}", &assets[0].info, &assets[1].info),
),
("pair", &pair),
("order_id", &order_id.to_string()),
("status", &format!("{:?}", OrderStatus::Open)),
("direction", &format!("{:?}", direction)),
Expand Down

0 comments on commit 3762086

Please sign in to comment.