@triadxyz/triad-protocol 3.0.6-beta → 3.0.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 +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -713,7 +713,7 @@ class TriadProtocolClient {
|
|
|
713
713
|
var _a;
|
|
714
714
|
return __awaiter(this, void 0, void 0, function* () {
|
|
715
715
|
const userOrders = yield this.getUserOrdersByMarketId(this.program.provider.publicKey, marketId);
|
|
716
|
-
const userNonce = (_a = userOrders.find((order) => order.orderDirection ===
|
|
716
|
+
const userNonce = (_a = userOrders.find((order) => order.orderDirection === direction &&
|
|
717
717
|
order.orderStatus === types_1.OrderStatus.OPEN)) === null || _a === void 0 ? void 0 : _a.userNonce;
|
|
718
718
|
let userTradePDA = null;
|
|
719
719
|
let userTradeIxs = [];
|
|
@@ -761,9 +761,9 @@ class TriadProtocolClient {
|
|
|
761
761
|
ixs.push(...setupInstructions);
|
|
762
762
|
ixs.push(...swapIxs);
|
|
763
763
|
addressLookupTableAccounts.push(...swapAddressLookupTableAccounts);
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
764
|
+
if (amountInUSDC.lt(new bn_js_1.default(amount * Math.pow(10, this.decimals)))) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
767
|
}
|
|
768
768
|
const { userTradePDA, userTradeIxs } = yield this.getUserTradeNonce(marketId, Object.keys(direction)[0]);
|
|
769
769
|
if (userTradeIxs.length > 0) {
|