Skip to content

Commit

Permalink
fix: remove duplicate entry in asset chain drop-down
Browse files Browse the repository at this point in the history
  • Loading branch information
woodenfurniture committed Nov 18, 2024
1 parent 197b65f commit 35962f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/state/slices/related-assets-selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ export const selectRelatedAssetIdsInclusive = createCachedSelector(
(relatedAssetIndex, asset, walletConnectedChainIds, onlyConnectedChains, assets): AssetId[] => {
if (!asset) return []
const relatedAssetKey = asset.relatedAssetKey
if (!relatedAssetKey) return [asset.assetId]
if (!relatedAssetKey || !relatedAssetIndex[relatedAssetKey]) return [asset.assetId]

const relatedAssetIdsInclusive = [relatedAssetKey]
.concat(relatedAssetIndex[relatedAssetKey] ?? [])
const relatedAssetIdsInclusive = (relatedAssetIndex[relatedAssetKey] ?? [])
// Filter out assetIds that are not in the assets store
.filter(assetId => assets?.[assetId])

Expand Down

0 comments on commit 35962f2

Please sign in to comment.