Skip to content

Commit

Permalink
chore: Add pools
Browse files Browse the repository at this point in the history
  • Loading branch information
garethfuller committed Jul 9, 2024
1 parent 1ca0b06 commit e936e66
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 10 deletions.
28 changes: 19 additions & 9 deletions src/components/banners/PointsBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,40 @@ const { hasPoints, poolPoints } = usePoints(props.pool);
function getIconSrc(protocol: Protocol) {
return protocolIconPaths[protocol];
}
const isPointsPool = computed(
() => hasPoints && poolPoints.value.some(p => p.multiple)
);
</script>

<template>
<div v-if="hasPoints" class="points-banner">
<span class="pb-3 sm:pb-0 leading-5"
>Liquidity providers in this pool also earn partner points</span
>
<span class="pb-3 sm:pb-0 leading-5">{{
isPointsPool
? 'Liquidity providers in this pool also earn partner points'
: 'Liquidity providers in this pool earn partner rewards'
}}</span>
<div class="flex">
<div
v-for="{ protocol, multiple, description } in poolPoints"
v-for="{ protocol, multiple, description, url } in poolPoints"
:key="protocol"
>
<BalTooltip placement="bottom" width="64">
<BalTooltip placement="bottom" width="64" :disabled="!description">
<template #activator>
<div
<component
:is="url ? 'a' : 'div'"
class="flex justify-center items-center py-2 px-3 ml-2 text-white rounded-full border border-gray-700 backdrop-blur-sm bg-black/20"
:href="url"
target="_blank"
rel="noopener noreferrer"
>
<BalAsset
:iconURI="getIconSrc(protocol)"
:alt="protocol"
class="mr-2"
:class="{ 'mr-2': multiple }"
/>
{{ multiple && `${multiple}x` }}
</div>
</component>
</template>
<div>
<div class="mb-2 font-bold">
Expand All @@ -52,7 +62,7 @@ function getIconSrc(protocol: Protocol) {
class="mb-2 list-disc"
v-html="description"
/>
<span>
<span v-if="multiple">
This UI does not provide real-time updates on partner point
multipliers. These points may change or expire and might not
reflect the most current info, please refer to the partner
Expand Down
14 changes: 14 additions & 0 deletions src/lib/config/fraxtal/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ const pools: Pools = {
{
protocol: Protocol.Superfest,
multiple: '',
url: 'https://jumper.exchange/superfest',
description:
'To find out more about Superfest, visit <a href="https://jumper.exchange/superfest" target="_blank" rel="noopener noreferrer">jumper.exchange/superfest</a>',
},
],
},
'0x1570315476480fa80cec1fff07a20c1df1adfd53000200000000000000000009': {
points: [
{
protocol: Protocol.Superfest,
multiple: '',
url: 'https://jumper.exchange/superfest',
description:
'To find out more about Superfest, visit <a href="https://jumper.exchange/superfest" target="_blank" rel="noopener noreferrer">jumper.exchange/superfest</a>',
},
],
},
Expand Down
15 changes: 14 additions & 1 deletion src/lib/config/mode/pools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CSP_ISSUE_POOL_IDS } from '@/constants/pool-lists/csp-issue';
import { PoolWarning, Pools } from '@/types/pools';
import { Network } from '../types';
import { Protocol } from '@/composables/useProtocols';

const pools: Pools = {
IdsMap: {},
Expand Down Expand Up @@ -42,7 +43,19 @@ const pools: Pools = {
},
Deep: [],
BoostedApr: [],
Metadata: {},
Metadata: {
'0xcf376bc82686be7f88fa8936c18c62a2f11c4003000200000000000000000009': {
points: [
{
protocol: Protocol.Superfest,
multiple: '',
url: 'https://jumper.exchange/superfest',
description:
'To find out more about Superfest, visit <a href="https://jumper.exchange/superfest" target="_blank" rel="noopener noreferrer">jumper.exchange/superfest</a>',
},
],
},
},
DisabledJoins: [],
BrandedRedirect: {
Gyro2: 'gyro',
Expand Down
1 change: 1 addition & 0 deletions src/types/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export type PoolMetadata = {
protocol: Protocol;
multiple: string;
description?: string;
url?: string;
expiryTimestamp?: number; // in secs - https://timestamp.online/
}[];
};
Expand Down

0 comments on commit e936e66

Please sign in to comment.