Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptokage1996 committed Sep 21, 2024
1 parent a224a67 commit 637c6db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 2 additions & 0 deletions bindings/src/querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ impl<'a> ElysQuerier<'a> {
.map_or(SignedDecimal::zero(), |funding_rate| funding_rate),
price_impact: SignedDecimal::from_str(&raw_resp.price_impact)
.map_or(SignedDecimal::zero(), |price_impact| price_impact),
borrow_fee: raw_resp.borrow_fee,
funding_fee: raw_resp.funding_fee,
};

Ok(resp)
Expand Down
4 changes: 4 additions & 0 deletions bindings/src/query_resp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ pub struct PerpetualOpenEstimationRawResponse {
pub borrow_interest_rate: String,
pub funding_rate: String,
pub price_impact: String,
pub borrow_fee: Coin,
pub funding_fee: Coin,
}

#[cw_serde]
Expand All @@ -147,6 +149,8 @@ pub struct PerpetualOpenEstimationResponse {
pub borrow_interest_rate: SignedDecimal,
pub funding_rate: SignedDecimal,
pub price_impact: SignedDecimal,
pub borrow_fee: Coin,
pub funding_fee: Coin,
}

#[cw_serde]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,11 @@ fn create_perpetual_open_order(
open_estimation.liquidation_price,
Fee {
percent: open_estimation.borrow_interest_rate.to_string(),
amount: Coin {
denom: open_estimation.collateral.denom,
amount: todo!(),
},
amount: open_estimation.borrow_fee,
},
Fee {
percent: open_estimation.funding_rate.to_string(),
amount: Coin {
denom: open_estimation.trading_asset,
amount: todo!(),
},
amount: open_estimation.funding_fee,
},
)?;

Expand Down

0 comments on commit 637c6db

Please sign in to comment.