Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Fixed intermittent errors at fetch time #24

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/lib/algorand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,16 @@ export async function getListings(tagName: string, minPrice=0, maxPrice=0): Prom

const balances = await lookup.do()

const lp = []
const listings = []
for (let bidx in balances.balances) {
const b = balances.balances[bidx]

if (b.address == ps.application.owner_addr || b.amount == 0) continue;

lp.push(getListing(b.address).then((listing)=>{
listings.push(listing)
}))
const listing = await getListing(b.address);
listings.push(listing);
}

await Promise.all(lp)

return listings
}

Expand Down