Skip to content

Commit

Permalink
fix coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
sparqet committed Jul 3, 2024
1 parent c79897a commit 6421503
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
7 changes: 6 additions & 1 deletion src/reader/reader.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,12 @@ mod Reader {
should_validate_min_collateral_usd: bool
) -> (bool, felt252) {
position_utils::is_position_liquiditable(
data_store, referral_storage, position, market, prices, should_validate_min_collateral_usd
data_store,
referral_storage,
position,
market,
prices,
should_validate_min_collateral_usd
)
}
}
Expand Down
21 changes: 12 additions & 9 deletions tests/integration/test_long_integration.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3713,9 +3713,10 @@ fn test_long_liquidation() {
short_token_price: Price { min: 1, max: 1, },
};

let (is_liquiditable, reason) = reader.is_position_liquidable(
data_store, referal_storage, first_position, market, market_prices, true
);
let (is_liquiditable, reason) = reader
.is_position_liquidable(
data_store, referal_storage, first_position, market, market_prices, true
);

assert(is_liquiditable == true, 'Position is liquidable');

Expand All @@ -3727,9 +3728,10 @@ fn test_long_liquidation() {
short_token_price: Price { min: 1, max: 1, },
};

let (is_liquiditable, reason) = reader.is_position_liquidable(
data_store, referal_storage, first_position, market, market_prices, true
);
let (is_liquiditable, reason) = reader
.is_position_liquidable(
data_store, referal_storage, first_position, market, market_prices, true
);

assert(is_liquiditable == false, 'Position is not liquidable');

Expand Down Expand Up @@ -4637,9 +4639,10 @@ fn test_long_leverage_liquidation() {
short_token_price: Price { min: 1, max: 1, },
};

let (is_liquiditable, reason) = reader.is_position_liquidable(
data_store, referal_storage, first_position, market, market_prices, true
);
let (is_liquiditable, reason) = reader
.is_position_liquidable(
data_store, referal_storage, first_position, market, market_prices, true
);
// position x10 leverage is liquidable at 3000$, position x1 leverage is not liquidable at 3000$
assert(is_liquiditable == true, 'Position is liquidable');

Expand Down

0 comments on commit 6421503

Please sign in to comment.