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

[C-1311] Fix Collectibles #2114

Merged
merged 1 commit into from
Oct 10, 2022
Merged
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
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