@triadxyz/triad-protocol 3.4.6-beta → 3.4.8-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -519,7 +519,8 @@ class TriadProtocol {
|
|
|
519
519
|
signer: this.program.provider.publicKey,
|
|
520
520
|
payer: this.rpcOptions.payer,
|
|
521
521
|
market: (0, pda_1.getMarketPDA)(this.program.programId, marketId),
|
|
522
|
-
mint
|
|
522
|
+
mint,
|
|
523
|
+
order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, marketId, (0, helpers_1.getOrderDirection)(orderDirection))
|
|
523
524
|
})
|
|
524
525
|
.instruction());
|
|
525
526
|
return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions, addressLookupTableAccounts);
|
|
@@ -539,7 +540,8 @@ class TriadProtocol {
|
|
|
539
540
|
signer: this.program.provider.publicKey,
|
|
540
541
|
payer: this.rpcOptions.payer,
|
|
541
542
|
market: (0, pda_1.getMarketPDA)(this.program.programId, marketId),
|
|
542
|
-
mint: constants_1.TRD_MINT
|
|
543
|
+
mint: constants_1.TRD_MINT,
|
|
544
|
+
order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, marketId, (0, helpers_1.getOrderDirection)(orderDirection))
|
|
543
545
|
})
|
|
544
546
|
.instruction()
|
|
545
547
|
];
|
|
@@ -566,7 +568,8 @@ class TriadProtocol {
|
|
|
566
568
|
payer: this.rpcOptions.payer,
|
|
567
569
|
market: (0, pda_1.getMarketPDA)(this.program.programId, order.marketId),
|
|
568
570
|
mint: order.mint,
|
|
569
|
-
tokenProgram: (0, helpers_2.getTokenProgram)(order.mint)
|
|
571
|
+
tokenProgram: (0, helpers_2.getTokenProgram)(order.mint),
|
|
572
|
+
order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, order.marketId, (0, helpers_1.getOrderDirection)(order.orderDirection))
|
|
570
573
|
})
|
|
571
574
|
.instruction());
|
|
572
575
|
}
|
|
@@ -850,7 +853,8 @@ class TriadProtocol {
|
|
|
850
853
|
market: marketPDA,
|
|
851
854
|
orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, marketId),
|
|
852
855
|
bookOrderAskAuthority: new web3_js_1.PublicKey(order.authority),
|
|
853
|
-
|
|
856
|
+
order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, marketId, (0, helpers_1.getOrderDirection)(orderDirection)),
|
|
857
|
+
oppositeOrder: (0, pda_1.getOrderPDA)(this.program.programId, new web3_js_1.PublicKey(order.authority), marketId, (0, helpers_1.getOrderDirection)(orderDirection))
|
|
854
858
|
})
|
|
855
859
|
.instruction());
|
|
856
860
|
remainingUSDC = remainingUSDC.sub(usdcAmount);
|