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

Commit

Permalink
Undo change to prevent cache update when no collectibles (#2114)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptype authored Oct 10, 2022
1 parent b2764ba commit c737535
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions packages/web/src/common/store/profile/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,20 @@ export function* fetchOpenSeaAssets(user) {
])

const collectibleList = Object.values(collectiblesMap).flat()
if (collectibleList.length !== 0) {
yield put(
cacheActions.update(Kind.USERS, [
{
id: user.user_id,
metadata: {
collectibleList
}
}
])
)
if (!collectibleList.length) {
console.log('profile has no assets in OpenSea')
}

yield put(
cacheActions.update(Kind.USERS, [
{
id: user.user_id,
metadata: {
collectibleList
}
}
])
)
}

export function* fetchSolanaCollectiblesForWallets(wallets) {
Expand All @@ -147,16 +149,18 @@ export function* fetchSolanaCollectibles(user) {
)

const solanaCollectibleList = Object.values(collectiblesMap).flat()
if (solanaCollectibleList.length !== 0) {
yield put(
cacheActions.update(Kind.USERS, [
{
id: user.user_id,
metadata: { solanaCollectibleList }
}
])
)
if (!solanaCollectibleList.length) {
console.log('profile has no Solana NFTs')
}

yield put(
cacheActions.update(Kind.USERS, [
{
id: user.user_id,
metadata: { solanaCollectibleList }
}
])
)
}

function* fetchSupportersAndSupporting(userId) {
Expand Down

0 comments on commit c737535

Please sign in to comment.