Skip to content

Commit

Permalink
Merge pull request #71 from lidofinance/develop
Browse files Browse the repository at this point in the history
Develop to main
  • Loading branch information
itaven authored Oct 2, 2023
2 parents 53ab086 + 4fd2500 commit 63a63c7
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 17 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Tests and Checks

on: pull_request
on: push

jobs:
security:
uses: lidofinance/linters/.github/workflows/security.yml@master
permissions:
security-events: write
contents: read
docker:
uses: lidofinance/linters/.github/workflows/docker.yml@master
actions:
Expand Down
2 changes: 1 addition & 1 deletion features/rewards/components/rewardsTable/RewardsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const RewardsTable: FC<RewardsTableProps> = (props) => {
pagesCount={pageCount}
onItemClick={(currentPage: number) => setPage(currentPage - 1)}
activePage={page + 1}
siblingCount={4}
siblingCount={0}
/>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { forwardRef } from 'react';
import { useWeb3 } from 'reef-knot/web3-react';
import { useFormState, useWatch } from 'react-hook-form';

import { Checkbox, External } from '@lidofinance/lido-ui';
import { Checkbox, CheckboxProps, External } from '@lidofinance/lido-ui';
import { FormatToken } from 'shared/formatters';

import { RequestStatus } from './request-item-status';
Expand All @@ -15,7 +15,7 @@ type RequestItemProps = {
token_id: string;
name: `requests.${number}.checked`;
index: number;
} & React.ComponentProps<'input'>;
} & CheckboxProps;

export const RequestItem = forwardRef<HTMLInputElement, RequestItemProps>(
({ token_id, name, disabled, index, ...props }, ref) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@lidofinance/api-rpc": "^0.28.0",
"@lidofinance/eth-api-providers": "^0.28.0",
"@lidofinance/eth-providers": "^0.28.0",
"@lidofinance/lido-ui": "^3.8.1",
"@lidofinance/lido-ui": "^3.12.0",
"@lidofinance/lido-ui-blocks": "2.10.2",
"@lidofinance/next-api-wrapper": "^0.28.0",
"@lidofinance/next-ip-rate-limit": "^0.28.0",
Expand Down
25 changes: 25 additions & 0 deletions shared/components/footer/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
import { FC } from 'react';
import { version, branch } from 'build-info.json';

import {
FooterStyle,
FooterLink,
LogoLidoStyle,
FooterDivider,
Version,
LinkDivider,
} from './styles';

const getVersionInfo = () => {
const repoBaseUrl = 'https://github.com/lidofinance/ethereum-staking-widget';
if (version === 'REPLACE_WITH_VERSION')
return {
label: 'dev',
link: repoBaseUrl,
};
if (version === branch + ':-unknown')
return {
label: 'preview',
link: `${repoBaseUrl}/tree/${branch}`,
};
return {
label: `v${version}`,
link: `${repoBaseUrl}/releases/tag/${version}`,
};
};

const { label, link } = getVersionInfo();

export const Footer: FC = () => (
<FooterStyle size="full" forwardedAs="footer">
<LogoLidoStyle />
<FooterLink data-testid="termsOfUse" href="https://lido.fi/terms-of-use">
Terms of Use
</FooterLink>
<LinkDivider />
<FooterLink
data-testid="privacyNotice"
href="https://lido.fi/privacy-notice"
>
Privacy Notice
</FooterLink>
<Version href={link}>{label}</Version>
<FooterDivider />
</FooterStyle>
);
20 changes: 14 additions & 6 deletions shared/components/footer/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Container, Link } from '@lidofinance/lido-ui';
import styled from 'styled-components';

import { Container, Link } from '@lidofinance/lido-ui';
import { LogoLido } from 'shared/components/logos/logos';
import { NAV_MOBILE_MEDIA } from '../header/components/navigation/styles';

Expand Down Expand Up @@ -35,12 +36,12 @@ export const FooterLink = styled(Link)`
opacity: 1;
}
}
`;

&:not(:last-of-type)::after {
content: '';
border-right: 1px solid var(--lido-color-textSecondary);
margin: 0 6px;
}
export const LinkDivider = styled.div`
background: var(--lido-color-textSecondary);
width: 1px;
margin: 2px 6px;
`;

export const LogoLidoStyle = styled(LogoLido)`
Expand All @@ -64,3 +65,10 @@ export const FooterDivider = styled.div`
display: none;
}
`;

export const Version = styled(FooterLink)`
margin-left: auto;
padding: 2px 5px;
border-radius: ${({ theme }) => theme.borderRadiusesMap.xs}px;
background: rgba(122, 138, 160, 0.1);
`;
4 changes: 2 additions & 2 deletions shared/hook-form/controls/token-select-hook-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const TokenSelectHookForm = ({
icon={iconsMap[field.value]}
data-testid="drop-down"
error={isValidationErrorTypeValidate(errors[errorField]?.type)}
onChange={(value: TOKENS) => {
onChange={(value) => {
setValue(fieldName, value, {
shouldDirty: false,
shouldTouch: false,
Expand All @@ -64,7 +64,7 @@ export const TokenSelectHookForm = ({
shouldValidate: false,
});
clearErrors(resetField);
onChange?.(value);
onChange?.(value as TOKENS);
}}
>
{options.map(({ label, token }) => (
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2669,10 +2669,10 @@
dependencies:
"@lidofinance/blocks-connect-wallet-modal" "2.11.2"

"@lidofinance/lido-ui@^3.8.1":
version "3.8.1"
resolved "https://registry.yarnpkg.com/@lidofinance/lido-ui/-/lido-ui-3.8.1.tgz#21af8db3e27d12f08d032fcbedf00ea8904f9199"
integrity sha512-RalApHbilFGOePeRtRrcokMUQyH/YDcWu8njlZizNPxEDLJxMW8Y7i/rWtO05UESjEyvto2azTCDuPVuIhZHCw==
"@lidofinance/lido-ui@^3.12.0":
version "3.12.0"
resolved "https://registry.yarnpkg.com/@lidofinance/lido-ui/-/lido-ui-3.12.0.tgz#b53fcfc752adecd5fb3cf89d42ed17da085080de"
integrity sha512-COCnfqKpj0hrnY3BxCaZRbS7cRaUuI0lotrMC6jS5QVlsxcp1dJzDWzPzrFnO+7s+y7TFikMA5JRfQTVJowJHg==
dependencies:
"@styled-system/should-forward-prop" "5.1.5"
"@swc/helpers" "^0.4.11"
Expand Down

0 comments on commit 63a63c7

Please sign in to comment.