4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00

Removed waitFor(250) when looping through presence transactions. This fixes the slow loading issue.

This commit is contained in:
CalDescent 2022-09-24 17:25:59 +01:00
parent e832cc9f28
commit af28e59ecd

View File

@ -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
})