Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNineteen committed Nov 14, 2022
1 parent b01b0ec commit 90b56c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/driftpy/clearing_house.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,19 @@ async def open_position(
direction: PositionDirection,
amount: int,
market_index: int,
user_id: int = 0,
limit_price: int = 0,
ioc: bool = False,
user_id: int = 0,
):
return await self.send_ixs(
await self.get_open_position_ix(direction, amount, market_index, limit_price, ioc, user_id=user_id),
await self.get_open_position_ix(
direction,
amount,
market_index,
user_id,
limit_price,
ioc,
),
)

async def get_open_position_ix(
Expand Down
2 changes: 1 addition & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async def test_init_user(
user: User = await get_user_account(
clearing_house.program,
clearing_house.authority,
user_id=0
subaccount_id=0
)
assert user.authority == clearing_house.authority

Expand Down

0 comments on commit 90b56c6

Please sign in to comment.