diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b43ab60f1..8e3cb7817 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -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: diff --git a/features/rewards/components/rewardsTable/RewardsTable.tsx b/features/rewards/components/rewardsTable/RewardsTable.tsx index cec7993d1..bc92ea746 100644 --- a/features/rewards/components/rewardsTable/RewardsTable.tsx +++ b/features/rewards/components/rewardsTable/RewardsTable.tsx @@ -43,7 +43,7 @@ export const RewardsTable: FC = (props) => { pagesCount={pageCount} onItemClick={(currentPage: number) => setPage(currentPage - 1)} activePage={page + 1} - siblingCount={4} + siblingCount={0} /> ); diff --git a/features/withdrawals/claim/form/requests-list/request-item.tsx b/features/withdrawals/claim/form/requests-list/request-item.tsx index c291ae7cc..1043ccc8a 100644 --- a/features/withdrawals/claim/form/requests-list/request-item.tsx +++ b/features/withdrawals/claim/form/requests-list/request-item.tsx @@ -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'; @@ -15,7 +15,7 @@ type RequestItemProps = { token_id: string; name: `requests.${number}.checked`; index: number; -} & React.ComponentProps<'input'>; +} & CheckboxProps; export const RequestItem = forwardRef( ({ token_id, name, disabled, index, ...props }, ref) => { diff --git a/package.json b/package.json index 314743660..bc6b5c66c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/shared/components/footer/footer.tsx b/shared/components/footer/footer.tsx index d71abaac1..c36fb4b80 100644 --- a/shared/components/footer/footer.tsx +++ b/shared/components/footer/footer.tsx @@ -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 = () => ( Terms of Use + Privacy Notice + {label} ); diff --git a/shared/components/footer/styles.tsx b/shared/components/footer/styles.tsx index dbab07e78..87776dbcd 100644 --- a/shared/components/footer/styles.tsx +++ b/shared/components/footer/styles.tsx @@ -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'; @@ -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)` @@ -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); +`; diff --git a/shared/hook-form/controls/token-select-hook-form.tsx b/shared/hook-form/controls/token-select-hook-form.tsx index b81afe791..75f31b505 100644 --- a/shared/hook-form/controls/token-select-hook-form.tsx +++ b/shared/hook-form/controls/token-select-hook-form.tsx @@ -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, @@ -64,7 +64,7 @@ export const TokenSelectHookForm = ({ shouldValidate: false, }); clearErrors(resetField); - onChange?.(value); + onChange?.(value as TOKENS); }} > {options.map(({ label, token }) => ( diff --git a/yarn.lock b/yarn.lock index c4dd38482..13fb93c2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"