Skip to content

Commit 855a7b2

Browse files
committed
adds ping cancel trades scope
1 parent 8fe4a0b commit 855a7b2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/alarms/trade_offer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ export async function pingCancelTrades(pendingTrades: SlimTrade[], tradeHistory:
112112
const rolledBackTrade = (tradeHistory || []).find(
113113
(e) =>
114114
e.status === TradeStatus.TradeProtectionRollback &&
115-
!!e.received_assets.find((a) => a.asset_id === trade.contract?.item?.asset_id)
115+
!!e.received_assets.find((a) => a.asset_id === trade.contract?.item?.asset_id) &&
116+
(e.other_party_id === trade.seller_id || e.other_party_id === trade.buyer_id)
116117
);
117118
if (!rolledBackTrade) {
118119
// no rollback, trade offer was accepted, shouldn't cancel

0 commit comments

Comments
 (0)