Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blockworks-foundation/mango-client",
"version": "3.2.16",
"version": "3.2.17",
"description": "Client to interact with the Mango program on Solana",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
Expand Down
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
2 changes: 0 additions & 2 deletions src/instruction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ export function makeCancelPerpOrderInstruction(
},
});

console.log(order, order.orderId.toArray(), data);

return new TransactionInstruction({ keys, data, programId });
}

Expand Down