Skip to content

Commit

Permalink
Merge branch 'dev' into f/improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
DrunkenRandomWalker authored Oct 31, 2023
2 parents 8d6104f + 3d90788 commit 90f2a04
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion packages/injective-cosmwasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "Apache-2.0"
name = "injective-cosmwasm"
readme = "README.md"
repository = "https://github.com/InjectiveLabs/cw-injective/tree/master/packages/bindings"
version = "0.2.14"
version = "0.2.15"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
Expand Down
4 changes: 4 additions & 0 deletions packages/injective-cosmwasm/src/exchange/derivative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl DerivativeOrder {
market_id: MarketId,
subaccount_id: SubaccountId,
fee_recipient: Option<Addr>,
cid: Option<String>,
) -> Self {
DerivativeOrder {
market_id,
Expand All @@ -102,6 +103,7 @@ impl DerivativeOrder {
fee_recipient,
price,
quantity,
cid,
},
order_type,
margin,
Expand Down Expand Up @@ -199,6 +201,7 @@ impl ShortDerivativeOrder {
market_id: MarketId,
subaccount_id: ShortSubaccountId,
fee_recipient: Option<Addr>,
cid: Option<String>,
) -> Self {
ShortDerivativeOrder {
market_id,
Expand All @@ -207,6 +210,7 @@ impl ShortDerivativeOrder {
fee_recipient,
price,
quantity,
cid,
},
order_type,
margin,
Expand Down
3 changes: 3 additions & 0 deletions packages/injective-cosmwasm/src/exchange/order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pub struct OrderInfo {
pub fee_recipient: Option<Addr>,
pub price: FPDecimal,
pub quantity: FPDecimal,
pub cid: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
Expand All @@ -72,6 +73,7 @@ pub struct ShortOrderInfo {
pub fee_recipient: Option<Addr>,
pub price: FPDecimal,
pub quantity: FPDecimal,
pub cid: Option<String>,
}

impl From<OrderInfo> for ShortOrderInfo {
Expand All @@ -81,6 +83,7 @@ impl From<OrderInfo> for ShortOrderInfo {
fee_recipient: order_info.fee_recipient,
price: order_info.price,
quantity: order_info.quantity,
cid: order_info.cid,
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions packages/injective-cosmwasm/src/exchange/spot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl SpotOrder {
market_id: &MarketId,
subaccount_id: SubaccountId,
fee_recipient: Option<Addr>,
cid: Option<String>,
) -> Self {
SpotOrder {
market_id: market_id.clone(),
Expand All @@ -77,6 +78,7 @@ impl SpotOrder {
fee_recipient,
price,
quantity,
cid,
},
order_type,
trigger_price: None,
Expand Down Expand Up @@ -153,6 +155,7 @@ impl ShortSpotOrder {
market_id: &MarketId,
subaccount_id: ShortSubaccountId,
fee_recipient: Option<Addr>,
cid: Option<String>,
) -> Self {
ShortSpotOrder {
market_id: market_id.clone(),
Expand All @@ -161,6 +164,7 @@ impl ShortSpotOrder {
fee_recipient,
price,
quantity,
cid,
},
order_type,
trigger_price: None,
Expand Down Expand Up @@ -194,6 +198,7 @@ pub struct ShortOrderInfo {
pub fee_recipient: Option<Addr>,
pub price: FPDecimal,
pub quantity: FPDecimal,
pub cid: Option<String>,
}

impl From<OrderInfo> for ShortOrderInfo {
Expand All @@ -203,6 +208,7 @@ impl From<OrderInfo> for ShortOrderInfo {
fee_recipient: order_info.fee_recipient,
price: order_info.price,
quantity: order_info.quantity,
cid: order_info.cid,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/injective-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ anyhow = "1.0.66"
base64 = "0.13.1"
cosmwasm-std = { version = "1.4.1", features = [ "abort", "iterator" ] }
cw-multi-test = "0.16.2"
injective-cosmwasm = { version = "0.2.0", path = "../injective-cosmwasm" }
injective-cosmwasm = { version = "0.2.15", path = "../injective-cosmwasm" }
injective-math = { version = "0.2.0", path = "../injective-math" }
rand = "0.4.6"
secp256k1 = "0.6.2"
Expand Down

0 comments on commit 90f2a04

Please sign in to comment.