From d698a6e22bbb77dfa9073701e389c305ce694d66 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Thu, 19 Dec 2024 12:50:55 +0100 Subject: [PATCH 01/12] feat: add eth icon to crvUSD app --- .../switch-chain/ui/ChainSwitcher.tsx | 19 +++++++++++++------ .../curve-ui-kit/src/shared/ui/Metric.tsx | 6 +++--- .../curve-ui-kit/src/themes/components.ts | 5 +++++ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx b/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx index 0dbcf177c..0d2ffc929 100644 --- a/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx +++ b/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx @@ -11,6 +11,8 @@ import { ChainIcon } from './ChainIcon' import { ChainList } from './ChainList' import { ChainSettings } from './ChainSettings' import { useLocalStorage } from 'curve-ui-kit/src/hooks/useLocalStorage' +import Snackbar from '@mui/material/Snackbar' +import Alert from '@mui/material/Alert' export type ChainOption = { chainId: TChainId @@ -35,22 +37,27 @@ export const ChainSwitcher = ({ disabled, }: ChainSwitcherProps) => { const [isOpen, , close, toggle] = useSwitch() + const [isSnackbarOpen, openSnackbar, hideSnackbar] = useSwitch() const [isSettingsOpen, openSettings, closeSettings] = useSwitch() const [showTestnets, setShowTestnets] = useLocalStorage('showTestnets', false) const selectedNetwork = useMemo(() => options.find((o) => o.chainId === chainId) ?? options[0], [options, chainId]) useEffect(() => () => close(), [chainId, close]) // close on chain change - if (options.length <= 1) { - return null - } - + const onClick = options.length > 1 ? toggle : openSnackbar return ( <> - + - + {options.length > 1 && } + + + + {t`Minting is only available on the Ethereum Mainnet`} + + + {isOpen != null && ( )} - setOpenCopyAlert(false)}> + setOpenCopyAlert(false)}> - Copied metric value: {value} + {t`Copied metric value`}: {value} diff --git a/packages/curve-ui-kit/src/themes/components.ts b/packages/curve-ui-kit/src/themes/components.ts index aa8888a95..d23fa5b2a 100644 --- a/packages/curve-ui-kit/src/themes/components.ts +++ b/packages/curve-ui-kit/src/themes/components.ts @@ -79,6 +79,11 @@ export const createComponents = (design: DesignSystem): ThemeOptions['components }, }, }, + MuiSnackbar: { + defaultProps: { + autoHideDuration: 6000, + }, + }, MuiSkeleton: { styleOverrides: { root: { From dde21a071e55f4c8ec9d583cb42a3968fd585860 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Fri, 27 Dec 2024 09:33:10 +0100 Subject: [PATCH 02/12] fix: review comments --- apps/dao/lingui.config.js | 1 + .../src/features/switch-chain/ui/ChainSwitcher.tsx | 8 +++++++- packages/curve-ui-kit/src/shared/ui/Metric.tsx | 3 ++- packages/curve-ui-kit/src/themes/components.ts | 5 ----- packages/curve-ui-kit/src/themes/design/0_primitives.ts | 4 ++++ 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/dao/lingui.config.js b/apps/dao/lingui.config.js index ad4b3f845..7d4f8ed0a 100644 --- a/apps/dao/lingui.config.js +++ b/apps/dao/lingui.config.js @@ -15,6 +15,7 @@ module.exports = { 'src/pages', 'src/store', '../../packages/curve-ui-kit', + '../../packages/curve-common', ], }, ], diff --git a/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx b/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx index 0d2ffc929..42874d3ff 100644 --- a/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx +++ b/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx @@ -13,6 +13,7 @@ import { ChainSettings } from './ChainSettings' import { useLocalStorage } from 'curve-ui-kit/src/hooks/useLocalStorage' import Snackbar from '@mui/material/Snackbar' import Alert from '@mui/material/Alert' +import { Duration } from 'curve-ui-kit/src/themes/design/0_primitives' export type ChainOption = { chainId: TChainId @@ -52,7 +53,12 @@ export const ChainSwitcher = ({ {options.length > 1 && } - + {t`Minting is only available on the Ethereum Mainnet`} diff --git a/packages/curve-ui-kit/src/shared/ui/Metric.tsx b/packages/curve-ui-kit/src/shared/ui/Metric.tsx index 7d5130d78..e666b5a48 100644 --- a/packages/curve-ui-kit/src/shared/ui/Metric.tsx +++ b/packages/curve-ui-kit/src/shared/ui/Metric.tsx @@ -12,6 +12,7 @@ import { SizesAndSpaces } from 'curve-ui-kit/src/themes/design/1_sizes_spaces' import { TypographyVariantKey, TYPOGRAPHY_VARIANTS } from 'curve-ui-kit/src/themes/typography' import { abbreviateNumber, scaleSuffix } from 'curve-ui-kit/src/utils' import { t } from '@lingui/macro' +import { Duration } from '../../themes/design/0_primitives' const { Spacing } = SizesAndSpaces @@ -224,7 +225,7 @@ export const Metric = ({ )} - setOpenCopyAlert(false)}> + setOpenCopyAlert(false)} autoHideDuration={Duration.Snackbar}> {t`Copied metric value`}: {value} diff --git a/packages/curve-ui-kit/src/themes/components.ts b/packages/curve-ui-kit/src/themes/components.ts index d23fa5b2a..aa8888a95 100644 --- a/packages/curve-ui-kit/src/themes/components.ts +++ b/packages/curve-ui-kit/src/themes/components.ts @@ -79,11 +79,6 @@ export const createComponents = (design: DesignSystem): ThemeOptions['components }, }, }, - MuiSnackbar: { - defaultProps: { - autoHideDuration: 6000, - }, - }, MuiSkeleton: { styleOverrides: { root: { diff --git a/packages/curve-ui-kit/src/themes/design/0_primitives.ts b/packages/curve-ui-kit/src/themes/design/0_primitives.ts index 9f852520d..bcb8d8f63 100644 --- a/packages/curve-ui-kit/src/themes/design/0_primitives.ts +++ b/packages/curve-ui-kit/src/themes/design/0_primitives.ts @@ -98,3 +98,7 @@ export const Sizing = { '700': '4rem', // 64px '800': '5.5rem', // 88px } as const + +export const Duration = { + Snackbar: 6000, +} From e56285744123c4ef1405a57b526a038fd50608e4 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Fri, 27 Dec 2024 11:01:04 +0100 Subject: [PATCH 03/12] fix: update tests --- .../src/features/switch-chain/ui/ChainSwitcher.tsx | 4 ++-- tests/cypress/e2e/all/header.cy.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx b/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx index 42874d3ff..d4b07b325 100644 --- a/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx +++ b/packages/curve-common/src/features/switch-chain/ui/ChainSwitcher.tsx @@ -59,8 +59,8 @@ export const ChainSwitcher = ({ anchorOrigin={{ horizontal: 'right', vertical: 'top' }} autoHideDuration={Duration.Snackbar} > - - {t`Minting is only available on the Ethereum Mainnet`} + + {t`This application is only available on the Ethereum Mainnet`} diff --git a/tests/cypress/e2e/all/header.cy.ts b/tests/cypress/e2e/all/header.cy.ts index 721c43464..ffdf833dd 100644 --- a/tests/cypress/e2e/all/header.cy.ts +++ b/tests/cypress/e2e/all/header.cy.ts @@ -67,7 +67,8 @@ describe('Header', () => { it('should change chains', () => { if (['loan', 'dao'].includes(Cypress.env('APP'))) { - cy.get(`[data-testid='btn-change-chain']`).should('not.exist') + cy.get(`[data-testid='btn-change-chain']`).click() + cy.get(`[data-testid='alert-eth-only']`).should('be.visible') cy.get("[data-testid='app-link-main']").invoke('attr', 'href').should('eq', `${mainAppUrl}/#/ethereum`) return } @@ -128,7 +129,8 @@ describe('Header', () => { it('should change chains', () => { if (['loan', 'dao'].includes(Cypress.env('APP'))) { - cy.get(`[data-testid='btn-change-chain']`).should('not.exist') + cy.get(`[data-testid='btn-change-chain']`).click() + cy.get(`[data-testid='alert-eth-only']`).should('be.visible') cy.get(`[data-testid='menu-toggle']`).click() cy.get(`[data-testid='sidebar-item-pools']`) .invoke('attr', 'href') From 10fc351daee5531c7032f8f8c816d65fc235f7d5 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Mon, 6 Jan 2025 09:45:52 +0100 Subject: [PATCH 04/12] fix: move snackbar under the header --- apps/lend/src/layout/Header.tsx | 2 +- apps/main/src/layout/default/Header.tsx | 7 ++----- packages/curve-common/src/widgets/Header/DesktopHeader.tsx | 2 +- packages/curve-common/src/widgets/Header/MobileHeader.tsx | 2 +- packages/curve-common/src/widgets/Header/types.ts | 3 +-- .../src/features/switch-chain/ui/ChainSwitcher.tsx | 5 ++++- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/lend/src/layout/Header.tsx b/apps/lend/src/layout/Header.tsx index 636f06bba..edbc46bb1 100644 --- a/apps/lend/src/layout/Header.tsx +++ b/apps/lend/src/layout/Header.tsx @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo, useRef } from 'react' +import { useCallback, useMemo, useRef } from 'react' import { t } from '@lingui/macro' import { useNavigate } from 'react-router-dom' import { CONNECT_STAGE } from '@/constants' diff --git a/apps/main/src/layout/default/Header.tsx b/apps/main/src/layout/default/Header.tsx index ae27db2d4..0eb8629dd 100644 --- a/apps/main/src/layout/default/Header.tsx +++ b/apps/main/src/layout/default/Header.tsx @@ -31,7 +31,7 @@ export const Header = ({ sections, BannerProps }: HeaderProps) => { const themeType = useStore((state) => state.themeType) const setThemeType = useStore((state) => state.setThemeType) const getNetworkConfigFromApi = useStore((state) => state.getNetworkConfigFromApi) - const routerProps = useStore((state) => state.routerProps) + const routerPathname = useStore((state) => state.routerProps)?.location?.pathname ?? '' const updateConnectState = useStore((state) => state.updateConnectState) const networks = useStore((state) => state.networks.networks) const visibleNetworksList = useStore((state) => state.networks.visibleNetworksList) @@ -41,10 +41,7 @@ export const Header = ({ sections, BannerProps }: HeaderProps) => { const { hasRouter } = getNetworkConfigFromApi(rChainId) const routerCached = useStore((state) => state.storeCache.routerFormValues[rChainId]) - const { params: routerParams, location } = routerProps ?? {} const network = networks[rChainId] - const routerPathname = location?.pathname ?? '' - const routerNetwork = routerParams?.network const restPartialPathname = useRestPartialPathname() const theme = themeType == 'default' ? 'light' : (themeType as ThemeKey) @@ -74,7 +71,7 @@ export const Header = ({ sections, BannerProps }: HeaderProps) => { routerPathname, rNetwork, ), - [hasRouter, network, networks, rChainId, rLocalePathname, routerCached, routerNetwork, routerPathname], + [hasRouter, network, networks, rChainId, rLocalePathname, rNetwork, routerCached, routerPathname], )} themes={[ theme, diff --git a/packages/curve-common/src/widgets/Header/DesktopHeader.tsx b/packages/curve-common/src/widgets/Header/DesktopHeader.tsx index d0f4bc433..a2115a9a6 100644 --- a/packages/curve-common/src/widgets/Header/DesktopHeader.tsx +++ b/packages/curve-common/src/widgets/Header/DesktopHeader.tsx @@ -52,7 +52,7 @@ export const DesktopHeader = ({ {advancedMode && } - + diff --git a/packages/curve-common/src/widgets/Header/MobileHeader.tsx b/packages/curve-common/src/widgets/Header/MobileHeader.tsx index a6878db9f..a127ed52f 100644 --- a/packages/curve-common/src/widgets/Header/MobileHeader.tsx +++ b/packages/curve-common/src/widgets/Header/MobileHeader.tsx @@ -64,7 +64,7 @@ export const MobileHeader = ({ ({ paddingBlock, zIndex: t.zIndex.drawer + 1 })}> = { mainNavRef: RefObject currentApp: AppName isLite?: boolean - ChainProps: ChainSwitcherProps + ChainProps: Omit, 'headerHeight'> WalletProps: ConnectWalletIndicatorProps BannerProps: GlobalBannerProps height: string diff --git a/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx b/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx index bb64bdb02..02bd6f33f 100644 --- a/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx +++ b/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx @@ -29,6 +29,7 @@ export type ChainSwitcherProps = { onChange: (chainId: TChainId) => void disabled?: boolean theme: ThemeKey + headerHeight: string } export const ChainSwitcher = ({ @@ -36,6 +37,7 @@ export const ChainSwitcher = ({ chainId, onChange, disabled, + headerHeight, }: ChainSwitcherProps) => { const [isOpen, , close, toggle] = useSwitch() const [isSnackbarOpen, openSnackbar, hideSnackbar] = useSwitch() @@ -57,9 +59,10 @@ export const ChainSwitcher = ({ open={isSnackbarOpen} onClose={hideSnackbar} anchorOrigin={{ horizontal: 'right', vertical: 'top' }} + sx={{ top: headerHeight }} autoHideDuration={Duration.Snackbar} > - + {t`This application is only available on the Ethereum Mainnet`} From b60a46592c14407a60fb8ebfceef5c10592aad36 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Mon, 6 Jan 2025 13:11:33 +0100 Subject: [PATCH 05/12] fix: margin and warn colors --- .../src/features/switch-chain/ui/ChainSwitcher.tsx | 4 ++-- packages/curve-ui-kit/src/themes/design/2_theme.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx b/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx index 02bd6f33f..d9e9c2a90 100644 --- a/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx +++ b/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx @@ -59,8 +59,8 @@ export const ChainSwitcher = ({ open={isSnackbarOpen} onClose={hideSnackbar} anchorOrigin={{ horizontal: 'right', vertical: 'top' }} - sx={{ top: headerHeight }} - autoHideDuration={Duration.Snackbar} + sx={{ top: headerHeight, marginTop: 4 }} + autoHideDuration={Duration.Snackbar * 100} > {t`This application is only available on the Ethereum Mainnet`} diff --git a/packages/curve-ui-kit/src/themes/design/2_theme.ts b/packages/curve-ui-kit/src/themes/design/2_theme.ts index 484e86cbc..daedbb269 100644 --- a/packages/curve-ui-kit/src/themes/design/2_theme.ts +++ b/packages/curve-ui-kit/src/themes/design/2_theme.ts @@ -146,7 +146,7 @@ export const createLightDesign = (Light: typeof plain.Light | typeof inverted.Li const Feedback = { Success: Greens[300], Info: Layer[3].Fill, - Warning: Reds[300], + Warning: Reds[400], Error: Reds[500], } as const return { @@ -743,7 +743,7 @@ export const createChadDesign = (Chad: typeof plain.Chad | typeof inverted.Chad) const Feedback = { Success: Greens[400], Info: Layer[3].Fill, - Warning: Reds[300], + Warning: Reds[400], Error: Reds[500], } as const return { From 2d06f3015ffc2eb7b884c3a537afc66b759312dc Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Mon, 6 Jan 2025 14:03:13 +0100 Subject: [PATCH 06/12] fix: adjust snackbar location for large screens --- .../features/switch-chain/ui/ChainSwitcher.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx b/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx index d9e9c2a90..29bb1f4a3 100644 --- a/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx +++ b/packages/curve-ui-kit/src/features/switch-chain/ui/ChainSwitcher.tsx @@ -14,6 +14,7 @@ import { useLocalStorage } from '@ui-kit/hooks/useLocalStorage' import Snackbar from '@mui/material/Snackbar' import Alert from '@mui/material/Alert' import { Duration } from 'curve-ui-kit/src/themes/design/0_primitives' +import Container from '@mui/material/Container' export type ChainOption = { chainId: TChainId @@ -58,13 +59,15 @@ export const ChainSwitcher = ({ - - {t`This application is only available on the Ethereum Mainnet`} - + + + {t`This application is only available on the Ethereum Mainnet`} + + {isOpen != null && ( From 1b0b1ac1438aa4eb8b4648d3be35df82d504d702 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Tue, 7 Jan 2025 09:40:12 +0100 Subject: [PATCH 07/12] fix: no lingui in storybook --- packages/curve-ui-kit/src/shared/ui/Metric.tsx | 6 ++++-- .../curve-ui-kit/src/shared/ui/stories/Metric.stories.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/curve-ui-kit/src/shared/ui/Metric.tsx b/packages/curve-ui-kit/src/shared/ui/Metric.tsx index e666b5a48..805426fdc 100644 --- a/packages/curve-ui-kit/src/shared/ui/Metric.tsx +++ b/packages/curve-ui-kit/src/shared/ui/Metric.tsx @@ -11,7 +11,6 @@ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined' import { SizesAndSpaces } from 'curve-ui-kit/src/themes/design/1_sizes_spaces' import { TypographyVariantKey, TYPOGRAPHY_VARIANTS } from 'curve-ui-kit/src/themes/typography' import { abbreviateNumber, scaleSuffix } from 'curve-ui-kit/src/utils' -import { t } from '@lingui/macro' import { Duration } from '../../themes/design/0_primitives' const { Spacing } = SizesAndSpaces @@ -84,6 +83,8 @@ type Props = { label: string /** Optional tooltip content shown next to the label */ tooltip?: string + /** The text to display when the value is copied to the clipboard */ + copyText?: string /** The actual metric value to display */ value: number @@ -114,6 +115,7 @@ type Props = { export const Metric = ({ label, tooltip, + copyText, value, formatter = (value: number) => formatValue(value, decimals), @@ -227,7 +229,7 @@ export const Metric = ({ setOpenCopyAlert(false)} autoHideDuration={Duration.Snackbar}> - {t`Copied metric value`}: {value} + {copyText}: {value} diff --git a/packages/curve-ui-kit/src/shared/ui/stories/Metric.stories.ts b/packages/curve-ui-kit/src/shared/ui/stories/Metric.stories.ts index 70cb24e01..28f91f68d 100644 --- a/packages/curve-ui-kit/src/shared/ui/stories/Metric.stories.ts +++ b/packages/curve-ui-kit/src/shared/ui/stories/Metric.stories.ts @@ -65,6 +65,7 @@ const meta: Meta = { value: 26539422, decimals: 1, label: 'Metrics label', + copyText: 'Copied metric value', unit: 'dollar', }, } From 595bfcaa9dff9fdb8edf14860adb1b5c2f229e46 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Wed, 8 Jan 2025 10:23:47 +0100 Subject: [PATCH 08/12] fix: mui font weight --- .../src/themes/design/1_sizes_spaces.ts | 42 ++++--------------- 1 file changed, 7 insertions(+), 35 deletions(-) diff --git a/packages/curve-ui-kit/src/themes/design/1_sizes_spaces.ts b/packages/curve-ui-kit/src/themes/design/1_sizes_spaces.ts index 3b5af8e75..2e71ebde7 100644 --- a/packages/curve-ui-kit/src/themes/design/1_sizes_spaces.ts +++ b/packages/curve-ui-kit/src/themes/design/1_sizes_spaces.ts @@ -183,41 +183,13 @@ const MappedButtonSize = { } const MappedFontWeight = { - Extra_Light: { - mobile: '200', - tablet: '200', - desktop: '200', - }, - Light: { - mobile: '300', - tablet: '300', - desktop: '300', - }, - Normal: { - mobile: '400', - tablet: '400', - desktop: '400', - }, - Medium: { - mobile: '500', - tablet: '500', - desktop: '500', - }, - Semi_Bold: { - mobile: '600', - tablet: '600', - desktop: '600', - }, - Bold: { - mobile: '700', - tablet: '700', - desktop: '700', - }, - Extra_Bold: { - mobile: '800', - tablet: '800', - desktop: '800', - }, + Extra_Light: 200, + Light: 300, + Normal: 400, + Medium: 500, + Semi_Bold: 600, + Bold: 700, + Extra_Bold: 800, } as const const MappedLineHeight = { From c977b37033c5925b5bdc24eff6d0a20c8eb9353a Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Wed, 8 Jan 2025 10:27:36 +0100 Subject: [PATCH 09/12] fix: mui button font weight --- packages/curve-ui-kit/src/themes/button/mui-button.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/curve-ui-kit/src/themes/button/mui-button.ts b/packages/curve-ui-kit/src/themes/button/mui-button.ts index 3f6a3ccf5..f8bfe3df7 100644 --- a/packages/curve-ui-kit/src/themes/button/mui-button.ts +++ b/packages/curve-ui-kit/src/themes/button/mui-button.ts @@ -27,14 +27,14 @@ const buttonColor = ({ Default, Disabled, Hover, Current }: ButtonColor) => ({ const sizeBreakpoint = ( height: string, fontSize: Responsive, - fontWeight: Responsive, + fontWeight: number, lineHeight: Responsive, breakpoint: Breakpoint, ) => ({ [basicMuiTheme.breakpoints.up(breakpoint)]: { height, fontSize: fontSize[breakpoint], - fontWeight: fontWeight[breakpoint], + fontWeight, lineHeight: lineHeight[breakpoint], }, }) From 066c3e1a34d52d4dddb574a94a41f6055485c57d Mon Sep 17 00:00:00 2001 From: mimaklas <161614979+mimaklas@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:01:07 +0200 Subject: [PATCH 10/12] Update campaign-list.json --- packages/external-rewards/src/campaign-list.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/external-rewards/src/campaign-list.json b/packages/external-rewards/src/campaign-list.json index 0de59e660..75f3b064f 100644 --- a/packages/external-rewards/src/campaign-list.json +++ b/packages/external-rewards/src/campaign-list.json @@ -76,5 +76,8 @@ }, { "campaign": "Babylon.json" + }, + { + "campaign": "Vnx.json" } ] From 617e86d0035218c3c7a790abb1e6e111082db010 Mon Sep 17 00:00:00 2001 From: mimaklas <161614979+mimaklas@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:02:10 +0200 Subject: [PATCH 11/12] Create Vnx.json --- .../external-rewards/src/campaigns/Vnx.json | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/external-rewards/src/campaigns/Vnx.json diff --git a/packages/external-rewards/src/campaigns/Vnx.json b/packages/external-rewards/src/campaigns/Vnx.json new file mode 100644 index 000000000..50d8a6e35 --- /dev/null +++ b/packages/external-rewards/src/campaigns/Vnx.json @@ -0,0 +1,33 @@ +{ + "campaignName": "VNX Points", + "platform": "VNX", + "description": "Points for providing liquidity.", + "platformImageId": "vnx.png", + "dashboardLink": "https://vnx.community/dashboard", + "pools": [ + { + "id": "null", + "action": "lp", + "description": "null", + "campaignStart": "0", + "campaignEnd": "1770000000", + "address": "0xda73dc70d5ca3f51b0000c308abcd358b5f3fefe", + "network": "fraxtal", + "multiplier": "2x", + "tags": ["points"], + "lock": "false" + }, + { + "id": "null", + "action": "lp", + "description": "null", + "campaignStart": "0", + "campaignEnd": "1770000000", + "address": "0x77146b0a1d08b6844376df6d9da99ba7f1b19e71", + "network": "fraxtal", + "multiplier": "2x", + "tags": ["points"], + "lock": "false" + } + ] +} From 98e9e942a1d4366414af6539168e1483f8bc47a0 Mon Sep 17 00:00:00 2001 From: mimaklas <161614979+mimaklas@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:02:44 +0200 Subject: [PATCH 12/12] Update index.ts --- packages/external-rewards/src/campaigns/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/external-rewards/src/campaigns/index.ts b/packages/external-rewards/src/campaigns/index.ts index 0efb27c06..00b0c9e32 100644 --- a/packages/external-rewards/src/campaigns/index.ts +++ b/packages/external-rewards/src/campaigns/index.ts @@ -24,6 +24,7 @@ import MindNetwork from './MindNetwork.json' import DTrinity from './DTrinity.json' import YieldFi from './YieldFi.json' import Babylon from './Babylon.json' +import Vnx from './Vnx.json' export { DLCLink, @@ -52,4 +53,5 @@ export { DTrinity, YieldFi, Babylon, + Vnx, }