Skip to content

Commit

Permalink
merge master + anchorpy upgrade pubkey fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbigz committed Nov 17, 2023
1 parent a037e12 commit 03b8379
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/driftpy/drift_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ async def get_place_spot_order_ix(
accounts={
"state": self.get_state_public_key(),
"user": user_account_public_key,
"authority": self.signer.public_key,
"authority": self.signer.pubkey,
},
remaining_accounts=remaining_accounts,
),
Expand Down Expand Up @@ -758,7 +758,7 @@ async def get_place_spot_orders_ix(
accounts={
"state": self.get_state_public_key(),
"user": self.get_user_account_public_key(user_id),
"authority": self.signer.public_key,
"authority": self.signer.pubkey,
},
remaining_accounts=remaining_accounts,
),
Expand All @@ -771,7 +771,7 @@ async def get_place_spot_orders_ix(
accounts={
"state": self.get_state_public_key(),
"user": user_account_public_key,
"authority": self.signer.public_key,
"authority": self.signer.pubkey,
},
remaining_accounts=remaining_accounts,
),
Expand All @@ -798,7 +798,7 @@ async def get_place_perp_order_ix(
self,
order_params: OrderParams,
user_id: int = 0,
) -> TransactionInstruction:
):
user_account_public_key = self.get_user_account_public_key(user_id)
remaining_accounts = await self.get_remaining_accounts(
writable_market_index=order_params.market_index, user_id=user_id
Expand All @@ -810,7 +810,7 @@ async def get_place_perp_order_ix(
accounts={
"state": self.get_state_public_key(),
"user": user_account_public_key,
"authority": self.signer.public_key,
"authority": self.signer.pubkey,
},
remaining_accounts=remaining_accounts,
),
Expand Down Expand Up @@ -840,7 +840,7 @@ async def get_place_perp_orders_ix(
accounts={
"state": self.get_state_public_key(),
"user": self.get_user_account_public_key(user_id),
"authority": self.signer.public_key,
"authority": self.signer.pubkey(),
},
remaining_accounts=remaining_accounts,
),
Expand All @@ -852,7 +852,7 @@ async def get_place_perp_orders_ix(
accounts={
"state": self.get_state_public_key(),
"user": user_account_public_key,
"authority": self.signer.public_key,
"authority": self.signer.pubkey(),
},
remaining_accounts=remaining_accounts,
),
Expand Down
4 changes: 2 additions & 2 deletions src/driftpy/drift_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class DriftUser:
def __init__(
self,
drift_client: DriftClient,
authority: Optional[PublicKey] = None,
authority: Optional[Pubkey] = None,
subaccount_id: int = 0,
account_subscriber: Optional[UserAccountSubscriber] = None,
):
"""Initialize the user object
Args:
drift_client(DriftClient): required for program_id, idl, things (keypair doesnt matter)
authority (Optional[PublicKey], optional): authority to investigate if None will use drift_client.authority
authority (Optional[Pubkey], optional): authority to investigate if None will use drift_client.authority
subaccount_id (int, optional): subaccount of authority to investigate. Defaults to 0.
"""
self.drift_client = drift_client
Expand Down

0 comments on commit 03b8379

Please sign in to comment.