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

Commit

Permalink
fix: estimation query
Browse files Browse the repository at this point in the history
  • Loading branch information
politeWall committed Dec 19, 2023
1 parent e2842bf commit b222d12
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 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.12.1"
version = "0.13.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.10.1", git = "https://github.com/elys-network/bindings", tag = "v0.10.1" }
elys-bindings = { git = "https://github.com/elys-network/bindings", tag = "v0.11.0" }

[dev-dependencies]

cw-multi-test = "0.13.4"
serde_json = "1.0.107"
elys-bindings = { version = "0.10.1", git = "https://github.com/elys-network/bindings", tag = "v0.10.1", features = [
elys-bindings = { git = "https://github.com/elys-network/bindings", tag = "v0.11.0", features = [
"testing",
] }
elys-bindings-test = { version = "0.10.1", git = "https://github.com/elys-network/bindings", tag = "v0.10.1" }
elys-bindings-test = { git = "https://github.com/elys-network/bindings", tag = "v0.11.0" }
4 changes: 2 additions & 2 deletions front_end_script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ This function retrieves an estimation of the value obtained by swapping one asse
- `amount` {Coin} : the amount of the value that you want to send or recive.
- `denom_in` (String) : The asset that you will send.
- `denom_out` (String) : The asset that you will recive.
- `user_address` (String): user_address to calculate the discount that the user have access
- `user_address` (String or null): user_address to calculate the discount that the user have access

#### Usage

Expand Down Expand Up @@ -343,7 +343,7 @@ this function query an estimation on opening a MarginPosition.
- `trading_asset` (String): The trading asset
- `collateral` (Coin {`denom`: String, `amount`: String}) The amount that the user would like to send as a collateral
- `take_profit_price` (String): the take profit price for the open position
- `user_address` (String): user_address to calculate the discount that the user have access
- `user_address` (String or null): user_address to calculate the discount that the user have access

#### Usage

Expand Down
2 changes: 1 addition & 1 deletion src/action/query/margin_open_estimation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn margin_open_estimation(
trading_asset: String,
collateral: Coin,
take_profit_price: Decimal,
_user_address: String, // Parameter unused until account history work
_user_address: Option<String>, // Parameter unused until account history work
) -> StdResult<MarginOpenEstimationResponse> {
let querier = ElysQuerier::new(&deps.querier);

Expand Down
2 changes: 1 addition & 1 deletion src/action/query/swap_estimation_by_denom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn swap_estimation_by_denom(
amount: Coin,
denom_in: String,
denom_out: String,
_user_address: String,
_user_address: Option<String>, // Parameter unused until account history work
) -> Result<AmmSwapEstimationByDenomResponse, ContractError> {
let querier = ElysQuerier::new(&deps.querier);

Expand Down
4 changes: 2 additions & 2 deletions src/msg/query_msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub enum QueryMsg {
amount: Coin,
denom_in: String,
denom_out: String,
user_address: String,
user_address: Option<String>,
},
#[returns(MarginMtpResponse)]
GetMarginPosition { id: u64, address: String },
Expand All @@ -50,6 +50,6 @@ pub enum QueryMsg {
trading_asset: String,
collateral: Coin,
take_profit_price: Decimal,
user_address: String,
user_address: Option<String>,
},
}

0 comments on commit b222d12

Please sign in to comment.