From d1702c5e534c01e440f11436988d17d35af5222f Mon Sep 17 00:00:00 2001 From: Seranged <80223622+Seranged@users.noreply.github.com> Date: Wed, 5 Aug 2026 09:31:05 +0100 Subject: [PATCH 01/13] feat: integrate public labels Load versioned Public Labels V3 content while preserving compatibility visibility rules. Keep co-brand rendering and campaign metadata independent of manager-profile functionality. --- components/entities/vault/VaultBorrowItem.vue | 5 + components/entities/vault/VaultPoints.vue | 15 +- .../entities/vault/VaultPointsModal.vue | 9 +- .../vault/discovery/DiscoveryMarketCard.vue | 2 +- composables/useEulerLabels.ts | 44 +- composables/useMarketGroups.ts | 6 +- docs/architecture.md | 2 +- docs/vault-labels-and-verification.md | 231 +------- entities/euler/labels.ts | 21 + entities/lend-discovery.ts | 2 + server/utils/v3-proxy.ts | 10 + tests/composables/useEulerLabels.test.ts | 21 + .../public-labels-v20260804151305236.ts | 185 +++++++ tests/server/v3-proxy.test.ts | 15 + tests/utils/discovery-calculations.test.ts | 19 + tests/utils/public-labels.test.ts | 201 +++++++ utils/discoveryCalculations.ts | 20 +- utils/public-labels.ts | 521 ++++++++++++++++++ 18 files changed, 1101 insertions(+), 228 deletions(-) create mode 100644 tests/fixtures/public-labels-v20260804151305236.ts create mode 100644 tests/utils/public-labels.test.ts create mode 100644 utils/public-labels.ts diff --git a/components/entities/vault/VaultBorrowItem.vue b/components/entities/vault/VaultBorrowItem.vue index 3443020d5..11f337cde 100644 --- a/components/entities/vault/VaultBorrowItem.vue +++ b/components/entities/vault/VaultBorrowItem.vue @@ -367,6 +367,11 @@ const linkPath = computed(() => ({ data-field="borrow-apy" :data-value="borrowApyWithRewards" > + import type { EulerEarn, EVault, SecuritizeCollateralVault } from '@eulerxyz/euler-v2-sdk' -import { getEulerLabelEntityLogo } from '~/entities/euler/labels' +import { getEulerLabelEntityLogo, getEulerLabelPointLogo } from '~/entities/euler/labels' import { useModal } from '~/components/ui/composables/useModal' import { VaultPointsModal } from '#components' -const { vault } = defineProps<{ vault: EVault | EulerEarn | SecuritizeCollateralVault }>() +const { vault, campaignType = 'deposit' } = defineProps<{ + vault: EVault | EulerEarn | SecuritizeCollateralVault + campaignType?: 'deposit' | 'borrow' +}>() -const points = useEulerPointsOfVault(vault.address) +const allPoints = useEulerPointsOfVault(vault.address) +const points = computed(() => allPoints.filter(point => + point.type ? point.type === campaignType : campaignType === 'deposit', +)) const modal = useModal() const onLogoError = (event: Event, logoFileName: string) => { @@ -27,6 +33,7 @@ const onPointClick = ( props: { pointName: point.name, pointLogo: point.logo, + campaignType, }, }) } @@ -42,7 +49,7 @@ const onPointClick = ( :key="point.name" class="w-16 h-16 rounded-full cursor-pointer select-none" :class="{ '-ml-6': index > 0 }" - :src="`/entities/${point.logo}`" + :src="getEulerLabelPointLogo(point.logo)" alt="Points entity logo" referrerpolicy="no-referrer" draggable="false" diff --git a/components/entities/vault/VaultPointsModal.vue b/components/entities/vault/VaultPointsModal.vue index 6c2d25cd1..48a1080f0 100644 --- a/components/entities/vault/VaultPointsModal.vue +++ b/components/entities/vault/VaultPointsModal.vue @@ -1,10 +1,11 @@