Skip to content

Commit fec5df2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into develop
2 parents 88535df + 6c7daa3 commit fec5df2

File tree

80 files changed

+2916
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2916
-82
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ WALLETCONNECT_PROJECT_ID=
4343

4444
# ETH Stake Widget API for IPFS mode
4545
WIDGET_API_BASE_PATH_FOR_IPFS=
46+
47+
# Survey api
48+
SURVEY_API=https://survey.testnet.fi

assets/icons/file.svg

Lines changed: 3 additions & 0 deletions
Loading

consts/external-links.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ type ExternalLinksConstants = {
3535
ethseerDashboard?: string;
3636
subscribeEvents: string;
3737
keysApi: string;
38+
surveyApi: string;
3839
};
3940

4041
export const EXTERNAL_LINKS_BY_NETWORK: Partial<
@@ -60,6 +61,7 @@ export const EXTERNAL_LINKS_BY_NETWORK: Partial<
6061
ethseerDashboard: 'https://ethseer.io',
6162
subscribeEvents: 'https://docs.lido.fi/staking-modules/csm/guides/events',
6263
keysApi: 'http://lido-events.lido-csm-mainnet.dappnode:8081', // DAPPNODE
64+
surveyApi: 'https://csm-surveys-api-mainnet.up.railway.app',
6365
},
6466
[CHAINS.Holesky]: {
6567
earlyAdoptionTree:
@@ -80,6 +82,7 @@ export const EXTERNAL_LINKS_BY_NETWORK: Partial<
8082
ratedExplorer: 'https://explorer.rated.network',
8183
subscribeEvents: 'https://docs.lido.fi/staking-modules/csm/guides/events',
8284
keysApi: 'http://lido-events.lido-csm-holesky.dappnode:8081', // DAPPNODE
85+
surveyApi: 'https://csm-surveys-api-testnet.up.railway.app',
8386
},
8487
};
8588

consts/urls.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ export const PATH = <const>{
2222
STEALING: '/stealing',
2323
STEALING_REPORT: '/stealing/report',
2424
STEALING_CANCEL: '/stealing/cancel',
25+
26+
SURVEYS: '/surveys',
27+
SURVEYS_CONTACTS: '/surveys/contacts',
28+
SURVEYS_EXPERIENCE: '/surveys/experience',
29+
SURVEYS_HOW_DID_YOU_LEARN_CSM: '/surveys/learn-csm',
30+
SURVEYS_SETUP: '/surveys/setup',
2531
};
2632

2733
export type PATH = (typeof PATH)[keyof typeof PATH];

env-dynamics.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ export const prefillUnsafeElRpcUrls17000 =
4141
/** @type string */
4242
export const widgetApiBasePathForIpfs =
4343
process.env.WIDGET_API_BASE_PATH_FOR_IPFS;
44+
45+
/** @type string */
46+
export const surveyApi = process.env.SURVEY_API;

features/dashboard/bond/last-rewards.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ import { differenceInCalendarDays, fromUnixTime } from 'date-fns';
1010
import { ModalComponentType, useModal } from 'providers/modal-provider';
1111
import { useNodeOperatorId } from 'providers/node-operator-provider';
1212
import { FC, useCallback } from 'react';
13-
import { GrayText, Stack, TextBlock, TxLinkEtherscan } from 'shared/components';
13+
import {
14+
GrayText,
15+
Plural,
16+
Stack,
17+
TextBlock,
18+
TxLinkEtherscan,
19+
} from 'shared/components';
1420
import { FaqElement } from 'shared/components/faq/styles';
1521
import {
1622
getNextRewardsFrame,
@@ -108,7 +114,16 @@ export const LastRewards: FC = () => {
108114
) : (
109115
<Stack center gap="xs">
110116
<GrayText>Expected</GrayText>
111-
<BadgeStyle>in {daysLeft} days</BadgeStyle>
117+
<BadgeStyle>
118+
{daysLeft === 0 ? (
119+
'Today'
120+
) : (
121+
<>
122+
in {daysLeft}{' '}
123+
<Plural variants={['day', 'days']} value={daysLeft} />
124+
</>
125+
)}
126+
</BadgeStyle>
112127
</Stack>
113128
))}
114129
</Stack>

features/starter-pack/paused-banner/paused-banner.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
import { FC } from 'react';
22

33
import { BannerHeader, BlockStyled } from './styles';
4+
import { getConfig } from 'config';
5+
import { CHAINS } from 'consts/chains';
6+
import { HoleskyBanner } from 'features/welcome/holesky-banner';
7+
8+
const { defaultChain } = getConfig();
49

510
export const PausedBanner: FC = () => {
11+
if (defaultChain === CHAINS.Holesky) {
12+
return <HoleskyBanner open />;
13+
}
14+
615
return (
716
<BlockStyled>
817
<BannerHeader>CSM is paused</BannerHeader>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export * from './survey-button';
2+
export * from './survey-item';
3+
export * from './survey-link';
4+
export * from './survey-section';
5+
export * from './warning';
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Button } from '@lidofinance/lido-ui';
2+
import { FC } from 'react';
3+
4+
type SurveyButtonProps = React.ComponentProps<typeof Button> & {
5+
title: string;
6+
};
7+
8+
export const SurveyButton: FC<SurveyButtonProps> = ({ title, ...props }) => {
9+
return (
10+
<Button variant="outlined" size="sm" {...props}>
11+
{title}
12+
</Button>
13+
);
14+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Block, Text } from '@lidofinance/lido-ui';
2+
import { FC, PropsWithChildren, ReactNode } from 'react';
3+
import { Stack } from 'shared/components';
4+
5+
type SurveyItemProps = {
6+
title: ReactNode;
7+
};
8+
9+
export const SurveyItem: FC<PropsWithChildren<SurveyItemProps>> = ({
10+
children,
11+
title,
12+
}) => {
13+
return (
14+
<Block>
15+
<Stack align="center" spaceBetween>
16+
<Text as="h4" size="sm" weight="bold">
17+
{title}
18+
</Text>
19+
<Stack gap="md">{children}</Stack>
20+
</Stack>
21+
</Block>
22+
);
23+
};

0 commit comments

Comments
 (0)