From af28e59ecd98d5e7b7bd6820072adf1aab911ce1 Mon Sep 17 00:00:00 2001 From: CalDescent <> Date: Sat, 24 Sep 2022 17:25:59 +0100 Subject: [PATCH] Removed waitFor(250) when looping through presence transactions. This fixes the slow loading issue. --- qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js b/qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js index 0f0ff82b..5da09bf3 100644 --- a/qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js +++ b/qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js @@ -1921,7 +1921,6 @@ class TradePortal extends LitElement { const processOffersWithPresence = () => { if (offeringTrades === null) return - const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)) async function asyncForEach(array, callback) { for (let index = 0; index < array.length; index++) { await callback(array[index], index, array) @@ -1932,7 +1931,6 @@ class TradePortal extends LitElement { if (tradePresenceTxns !== null) { await asyncForEach(tradePresenceTxns, async (tradePresence) => { - await waitFor(250) let offerIndex = offeringTrades.findIndex((offeringTrade) => offeringTrade.qortalCreatorTradeAddress === tradePresence.tradeAddress) offerIndex !== -1 ? (offeringTrades[offerIndex].tradePresenceExpiry = tradePresence.timestamp) : null })