@triadxyz/triad-protocol 2.0.3-beta → 2.0.5-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/trade.js +2 -5
- package/package.json +1 -1
package/dist/trade.js
CHANGED
|
@@ -572,11 +572,8 @@ class Trade {
|
|
|
572
572
|
if (order.linkedBidOrderId !== '0') {
|
|
573
573
|
const userOrders = yield this.getUserOrders(new web3_js_1.PublicKey(order.authority));
|
|
574
574
|
let linkedSellerBidTradePDA = (0, pda_1.getUserTradePDA)(this.program.programId, new web3_js_1.PublicKey(order.authority));
|
|
575
|
-
const linkedBidOrder = userOrders.find((
|
|
576
|
-
|
|
577
|
-
console.log('order', order);
|
|
578
|
-
console.log('userOrders', userOrders);
|
|
579
|
-
console.log('linkedBidOrder', linkedBidOrder);
|
|
575
|
+
const linkedBidOrder = userOrders.find((item) => item.orderId === order.linkedBidOrderId &&
|
|
576
|
+
item.marketId === marketId.toString());
|
|
580
577
|
if (!linkedBidOrder) {
|
|
581
578
|
throw new Error('Linked bid order not found');
|
|
582
579
|
}
|