Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(staking): introduce everstake on the staking landing screen #13

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/src/components/assets/Icon/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const ICONS = {
ADDRESS_PIXEL_NEXT: require('../../../images/icons/address_pixel_next.svg'),
DOWN: require('../../../images/icons/down.svg'),
DROPBOX: require('../../../images/icons/dropbox.svg'),
EVERSTAKE_LOGO: require('../../../images/icons/everstake_logo.svg'),
EJECT: require('../../../images/icons/eject.svg'),
EXPERIMENTAL: require('../../../images/icons/experimental.svg'),
EXTERNAL_LINK: require('../../../images/icons/external_link.svg'),
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/images/icons/everstake_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions packages/suite/src/support/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8541,6 +8541,14 @@ export default defineMessages({
id: 'TR_STAKE_ETH_LOCK_FUNDS_DESC',
defaultMessage: 'Staking locks in your funds, but you can unstake them anytime.',
},
TR_STAKE_ETH_EVERSTAKE: {
id: 'TR_STAKE_ETH_EVERSTAKE',
defaultMessage: 'Trezor & Everstake',
},
TR_STAKE_ETH_EVERSTAKE_DESC: {
id: 'TR_STAKE_ETH_EVERSTAKE_DESC',
defaultMessage: 'Everstake is a global leader and supplier of staking technology',
},
TR_STAKE_ETH_MAXIMIZE_REWARDS: {
id: 'TR_STAKE_ETH_MAXIMIZE_REWARDS',
defaultMessage: 'Maximize your rewards',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMemo } from 'react';
import styled, { useTheme } from 'styled-components';
import { Button, Card, Icon, Paragraph } from '@trezor/components';
import { Button, Card, Icon, Paragraph, variables } from '@trezor/components';
import { spacingsPx } from '@trezor/theme';
import { Translation, StakingFeature } from 'src/components/suite';
import { openModal } from 'src/actions/suite/modalActions';
Expand Down Expand Up @@ -43,6 +43,10 @@ const FlexRow = styled.div`
margin: ${spacingsPx.xl} 0 ${spacingsPx.xxl};
gap: 68px;
flex-wrap: wrap;

${variables.SCREEN_QUERY.BELOW_DESKTOP} {
flex-direction: column;
}
`;

const FlexRowChild = styled.div`
Expand Down Expand Up @@ -82,8 +86,14 @@ export const EmptyStakingCard = () => {
title: <Translation id="TR_STAKE_ETH_LOCK_FUNDS" />,
description: <Translation id="TR_STAKE_ETH_LOCK_FUNDS_DESC" />,
},
{
id: 2,
icon: <Icon icon="EVERSTAKE_LOGO" size={32} color={theme.iconEverstake} />,
title: <Translation id="TR_STAKE_ETH_EVERSTAKE" />,
description: <Translation id="TR_STAKE_ETH_EVERSTAKE_DESC" />,
},
],
[ethApy, theme.iconPrimaryDefault],
[ethApy, theme.iconEverstake, theme.iconPrimaryDefault],
);

return (
Expand Down
2 changes: 2 additions & 0 deletions packages/theme/src/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const light = {
iconOnTertiary: palette.lightGray800,
iconOnYellow: palette.lightGray1000,
iconPrimaryDefault: palette.lightPrimaryForest800,
iconEverstake: palette.lightGray700,
iconPrimaryPressed: palette.lightPrimaryForest900,
iconSubdued: palette.lightGray700,
interactionBackgroundDestructiveDefaultHoverOnElevation0: palette.lightAccentRed300,
Expand Down Expand Up @@ -268,6 +269,7 @@ export const colorVariants: Record<ThemeColorVariant, Colors> = {
iconOnTertiary: palette.darkGray800,
iconOnYellow: palette.darkGray000,
iconPrimaryDefault: palette.darkPrimaryForest800,
iconEverstake: palette.lightWhiteAlpha1000,
iconPrimaryPressed: palette.darkPrimaryForest900,
iconSubdued: palette.darkGray700,
interactionBackgroundDestructiveDefaultHoverOnElevation0: palette.darkAccentRed200,
Expand Down
Loading