@triadxyz/triad-protocol 3.0.1-beta → 3.0.2-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.d.ts +1 -1
- package/dist/index.js +1 -16
- package/dist/types/index.d.ts +0 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -415,7 +415,7 @@ export default class TriadProtocolClient {
|
|
|
415
415
|
*
|
|
416
416
|
* @param options - RPC options
|
|
417
417
|
*/
|
|
418
|
-
cancelBidOrder({ marketId, orderId, userNonce, mint, direction
|
|
418
|
+
cancelBidOrder({ marketId, orderId, userNonce, mint, direction }: CancelBidOrderArgs, options?: RpcOptions): Promise<string>;
|
|
419
419
|
/**
|
|
420
420
|
* Cancel Ask Order
|
|
421
421
|
* @param args.marketId - The ID of the Market
|
package/dist/index.js
CHANGED
|
@@ -826,7 +826,7 @@ class TriadProtocolClient {
|
|
|
826
826
|
*
|
|
827
827
|
* @param options - RPC options
|
|
828
828
|
*/
|
|
829
|
-
cancelBidOrder({ marketId, orderId, userNonce, mint, direction
|
|
829
|
+
cancelBidOrder({ marketId, orderId, userNonce, mint, direction }, options) {
|
|
830
830
|
return __awaiter(this, void 0, void 0, function* () {
|
|
831
831
|
const ixs = [];
|
|
832
832
|
const addressLookupTableAccounts = [];
|
|
@@ -844,21 +844,6 @@ class TriadProtocolClient {
|
|
|
844
844
|
tokenProgram: (0, helpers_1.getTokenProgram)(mint)
|
|
845
845
|
})
|
|
846
846
|
.instruction());
|
|
847
|
-
if (isTrdPayout) {
|
|
848
|
-
const { swapIxs, addressLookupTableAccounts: swapAddressLookupTableAccounts, setupInstructions } = yield (0, swap_1.swap)({
|
|
849
|
-
connection: this.program.provider.connection,
|
|
850
|
-
wallet: this.program.provider.publicKey.toBase58(),
|
|
851
|
-
inToken: constants_1.USDC_MINT.toString(),
|
|
852
|
-
outToken: constants_1.TRD_MINT.toString(),
|
|
853
|
-
amount: Math.floor((remainingShares * price) / Math.pow(10, this.decimals))
|
|
854
|
-
});
|
|
855
|
-
if (swapIxs.length === 0) {
|
|
856
|
-
return;
|
|
857
|
-
}
|
|
858
|
-
ixs.push(...setupInstructions);
|
|
859
|
-
ixs.push(...swapIxs);
|
|
860
|
-
addressLookupTableAccounts.push(...swapAddressLookupTableAccounts);
|
|
861
|
-
}
|
|
862
847
|
return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
|
|
863
848
|
});
|
|
864
849
|
}
|
package/dist/types/index.d.ts
CHANGED