diff --git a/src/logic/fetch-elements/fetch-third-party-wearables.ts b/src/logic/fetch-elements/fetch-third-party-wearables.ts index af47306b..2033caed 100644 --- a/src/logic/fetch-elements/fetch-third-party-wearables.ts +++ b/src/logic/fetch-elements/fetch-third-party-wearables.ts @@ -316,7 +316,17 @@ async function _fetchThirdPartyWearables( fetchThirdPartyV2(providersV2) ]) - return [...thirdPartyV1, ...thirdPartyV2] + const allThirdPartyWearables = [...thirdPartyV1, ...thirdPartyV2] + const thirdPartyWearablesByUrn = allThirdPartyWearables.reduce( + (acc, tpw) => { + // If there are repeated wearables, we should merge them + acc[tpw.urn] = tpw + return acc + }, + {} as Record + ) + + return Object.values(thirdPartyWearablesByUrn) } export async function fetchThirdPartyWearablesFromThirdPartyName(