From 81a57c8a0f992223c51482ea818641e97657ce08 Mon Sep 17 00:00:00 2001 From: 0xdapper <94534135+0xdapper@users.noreply.github.com> Date: Sat, 4 May 2024 00:23:39 +0530 Subject: [PATCH 1/2] fix(Settings): dont hide deadline settings on L2s --- apps/web/src/components/Settings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/Settings/index.tsx b/apps/web/src/components/Settings/index.tsx index e611ce1f74f..f8a50e41928 100644 --- a/apps/web/src/components/Settings/index.tsx +++ b/apps/web/src/components/Settings/index.tsx @@ -118,7 +118,7 @@ export default function SettingsTab({ hideRoutingSettings?: boolean }) { const { chainId: connectedChainId } = useWeb3React() - const showDeadlineSettings = Boolean(chainId && !L2_CHAIN_IDS.includes(chainId)) + const showDeadlineSettings = Boolean(chainId) const node = useRef(null) const isOpen = useModalIsOpen(ApplicationModal.SETTINGS) From 4d0f7aa3612e29e81d1911934a5024f825e0527e Mon Sep 17 00:00:00 2001 From: 0xdapper <0xdapp@protonmail.com> Date: Sat, 4 May 2024 00:32:42 +0530 Subject: [PATCH 2/2] fix: dont ignore ttl on L2 deadlines --- apps/web/src/components/Settings/index.tsx | 2 +- apps/web/src/hooks/useTransactionDeadline.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/Settings/index.tsx b/apps/web/src/components/Settings/index.tsx index f8a50e41928..171ea4d6585 100644 --- a/apps/web/src/components/Settings/index.tsx +++ b/apps/web/src/components/Settings/index.tsx @@ -5,7 +5,7 @@ import AnimatedDropdown from 'components/AnimatedDropdown' import Column, { AutoColumn } from 'components/Column' import Row from 'components/Row' import MultipleRoutingOptions from 'components/Settings/MultipleRoutingOptions' -import { isSupportedChain, isUniswapXSupportedChain, L2_CHAIN_IDS } from 'constants/chains' +import { isSupportedChain, isUniswapXSupportedChain } from 'constants/chains' import useDisableScrolling from 'hooks/useDisableScrolling' import { useOnClickOutside } from 'hooks/useOnClickOutside' import { Trans } from 'i18n' diff --git a/apps/web/src/hooks/useTransactionDeadline.ts b/apps/web/src/hooks/useTransactionDeadline.ts index 8a292be494f..fb95e990992 100644 --- a/apps/web/src/hooks/useTransactionDeadline.ts +++ b/apps/web/src/hooks/useTransactionDeadline.ts @@ -1,6 +1,5 @@ import { BigNumber } from '@ethersproject/bignumber' import { useWeb3React } from '@web3-react/core' -import { L2_CHAIN_IDS } from 'constants/chains' import { L2_DEADLINE_FROM_NOW } from 'constants/misc' import { useCallback, useMemo } from 'react' import { useAppSelector } from 'state/hooks' @@ -29,8 +28,7 @@ export function useGetTransactionDeadline(): () => Promise