Skip to content

Removed duplicate wallet assignment. #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions src/driftpy/drift_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ def __init__(
self.program_id = DRIFT_PROGRAM_ID
self.program = Program(idl, self.program_id, provider)

if isinstance(wallet, Keypair):
wallet = Wallet(wallet)

if authority is None:
authority = wallet.public_key

Expand Down Expand Up @@ -1685,9 +1682,7 @@ def get_place_and_take_perp_order_ix(
maker_infos = (
maker_info
if isinstance(maker_info, list)
else [maker_info]
if maker_info
else []
else [maker_info] if maker_info else []
)

user_accounts = [self.get_user_account(sub_account_id)]
Expand Down Expand Up @@ -1787,9 +1782,7 @@ def get_place_and_take_spot_order_ix(
maker_infos = (
maker_info
if isinstance(maker_info, list)
else [maker_info]
if maker_info
else []
else [maker_info] if maker_info else []
)
for maker_info in maker_infos:
user_accounts.append(maker_info.maker_user_account)
Expand Down Expand Up @@ -2747,9 +2740,7 @@ async def get_fill_perp_order_ix(
maker_info = (
maker_info
if isinstance(maker_info, list)
else [maker_info]
if maker_info
else []
else [maker_info] if maker_info else []
)

user_accounts = [user_account]
Expand Down