Skip to content

Commit

Permalink
remove unecessary param
Browse files Browse the repository at this point in the history
Instead of removing the param entirely, default it to null to keep the change backwards compatible.
  • Loading branch information
0xzachvai committed Dec 15, 2021
1 parent 7496946 commit d650d9c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ export class MangoClient {
async placePerpOrder(
mangoGroup: MangoGroup,
mangoAccount: MangoAccount,
mangoCache: PublicKey, // TODO - remove; already in MangoGroup
mangoCache: PublicKey = null,
perpMarket: PerpMarket,
owner: Account | WalletAdapter,

Expand All @@ -1173,14 +1173,12 @@ export class MangoClient {
quantity,
);
const transaction = new Transaction();
const additionalSigners: Account[] = [];

const instruction = makePlacePerpOrderInstruction(
this.programId,
mangoGroup.publicKey,
mangoAccount.publicKey,
owner.publicKey,
mangoCache,
mangoCache ?? mangoGroup.mangoCache,
perpMarket.publicKey,
perpMarket.bids,
perpMarket.asks,
Expand Down Expand Up @@ -1227,6 +1225,7 @@ export class MangoClient {
transaction.add(consumeInstruction);
}

const additionalSigners: Account[] = [];
return await this.sendTransaction(transaction, owner, additionalSigners);
}

Expand Down

0 comments on commit d650d9c

Please sign in to comment.