|
|
@ -1921,7 +1921,6 @@ class TradePortal extends LitElement { |
|
|
|
const processOffersWithPresence = () => { |
|
|
|
const processOffersWithPresence = () => { |
|
|
|
if (offeringTrades === null) return |
|
|
|
if (offeringTrades === null) return |
|
|
|
|
|
|
|
|
|
|
|
const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)) |
|
|
|
|
|
|
|
async function asyncForEach(array, callback) { |
|
|
|
async function asyncForEach(array, callback) { |
|
|
|
for (let index = 0; index < array.length; index++) { |
|
|
|
for (let index = 0; index < array.length; index++) { |
|
|
|
await callback(array[index], index, array) |
|
|
|
await callback(array[index], index, array) |
|
|
@ -1932,7 +1931,6 @@ class TradePortal extends LitElement { |
|
|
|
|
|
|
|
|
|
|
|
if (tradePresenceTxns !== null) { |
|
|
|
if (tradePresenceTxns !== null) { |
|
|
|
await asyncForEach(tradePresenceTxns, async (tradePresence) => { |
|
|
|
await asyncForEach(tradePresenceTxns, async (tradePresence) => { |
|
|
|
await waitFor(250) |
|
|
|
|
|
|
|
let offerIndex = offeringTrades.findIndex((offeringTrade) => offeringTrade.qortalCreatorTradeAddress === tradePresence.tradeAddress) |
|
|
|
let offerIndex = offeringTrades.findIndex((offeringTrade) => offeringTrade.qortalCreatorTradeAddress === tradePresence.tradeAddress) |
|
|
|
offerIndex !== -1 ? (offeringTrades[offerIndex].tradePresenceExpiry = tradePresence.timestamp) : null |
|
|
|
offerIndex !== -1 ? (offeringTrades[offerIndex].tradePresenceExpiry = tradePresence.timestamp) : null |
|
|
|
}) |
|
|
|
}) |
|
|
|