mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-14 11:15:50 +00:00
Removed waitFor(250) when looping through presence transactions. This fixes the slow loading issue.
This commit is contained in:
parent
e832cc9f28
commit
af28e59ecd
@ -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
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user