Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
fix: use new amm_swap_exact_amount_in api (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond authored Nov 25, 2023
1 parent 99578af commit 4752159
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "trade_shield_contract"
version = "0.1.0"
version = "0.2.0"
edition = "2021"

[lib]
Expand All @@ -14,13 +14,13 @@ thiserror = "1"
schemars = "0.8.1"
cosmwasm-schema = "1.1.4"
cw-utils = "0.13"
elys-bindings = { version = "0.1.0", git = "https://github.com/elys-network/bindings", tag = "v0.1.0" }
elys-bindings = { version = "0.2.0", git = "https://github.com/elys-network/bindings", tag = "v0.2.0" }

[dev-dependencies]

cw-multi-test = "0.13.4"
serde_json = "1.0.107"
elys-bindings = { version = "0.1.0", git = "https://github.com/elys-network/bindings", tag = "v0.1.0", features = [
elys-bindings = { version = "0.2.0", git = "https://github.com/elys-network/bindings", tag = "v0.2.0", features = [
"testing",
] }
elys-bindings-test = { version = "0.1.0", git = "https://github.com/elys-network/bindings", tag = "v0.1.0" }
elys-bindings-test = { version = "0.2.0", git = "https://github.com/elys-network/bindings", tag = "v0.2.0" }
3 changes: 2 additions & 1 deletion src/action/execute/create_spot_order.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cosmwasm_std::{to_json_binary, Int128, StdResult, Storage, SubMsg};
use cosmwasm_std::{to_json_binary, Int128, Decimal, StdResult, Storage, SubMsg};
use elys_bindings::query_resp::InRouteByDenomResponse;

use crate::msg::ReplyType;
Expand Down Expand Up @@ -122,6 +122,7 @@ fn create_resp(
&new_order.order_amount,
&new_order.order_amm_routes,
Int128::zero(),
Decimal::zero(),
);

let info_id = if let Some(max_info) = reply_infos.iter().max_by_key(|info| info.id) {
Expand Down
1 change: 1 addition & 0 deletions src/action/sudo/process_spot_orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ fn process_order(
&order.order_amount,
&order.order_amm_routes,
token_out_min_amount,
Decimal::zero(),
);

let info_id = if let Some(max_info) = reply_infos.iter().max_by_key(|info| info.id) {
Expand Down

0 comments on commit 4752159

Please sign in to comment.