feat: approve collections in parallel on desktop, sequentially on mobile (#5374)

approve in parallel on desktop

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
This commit is contained in:
Charles Bachmeier 2022-11-21 16:43:59 -08:00 committed by GitHub
parent e8c09db146
commit 083ec425d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -99,17 +99,26 @@ const ListingModal = () => {
setOpenIndex(1)
}
const looksRareAddress = addresses.TRANSFER_MANAGER_ERC721
// for all unqiue collection, marketplace combos -> approve collections
// for all unique collection, marketplace combos -> approve collections
for (const collectionRow of collectionsRequiringApproval) {
verifyStatus(collectionRow.status) &&
(await approveCollectionRow(
collectionRow,
collectionsRequiringApproval,
setCollectionsRequiringApproval,
signer,
looksRareAddress,
pauseAllRows
))
(isMobile
? await approveCollectionRow(
collectionRow,
collectionsRequiringApproval,
setCollectionsRequiringApproval,
signer,
looksRareAddress,
pauseAllRows
)
: approveCollectionRow(
collectionRow,
collectionsRequiringApproval,
setCollectionsRequiringApproval,
signer,
looksRareAddress,
pauseAllRows
))
}
}