diff --git a/components/Tabs.tsx b/components/Tabs.tsx index 7087c00c42..e1e0af2e0d 100644 --- a/components/Tabs.tsx +++ b/components/Tabs.tsx @@ -66,6 +66,7 @@ export function Tabs({ {items.map(({ content, id }) => ( { onClick(id) diff --git a/components/assetsTable/AssetsFiltersContainer.tsx b/components/assetsTable/AssetsFiltersContainer.tsx index 678abc6bf2..97522d9487 100644 --- a/components/assetsTable/AssetsFiltersContainer.tsx +++ b/components/assetsTable/AssetsFiltersContainer.tsx @@ -5,7 +5,10 @@ import { Box, Flex } from 'theme-ui' import { useMediaQuery } from 'usehooks-ts' interface AssetsFiltersContainerProps { - filters: ReactNode[] + filters: { + id: string + component: ReactNode + }[] isSticky?: boolean lastWithAutoOffset?: boolean } @@ -48,8 +51,9 @@ export function AssetsFiltersContainer({ justifyContent: 'flex-start', }} > - {filters.map((filter) => ( + {filters.map(({ id, component }) => ( - {filter} + {component} ))} diff --git a/components/swapWidget/SwapWidgetNoSsr.tsx b/components/swapWidget/SwapWidgetNoSsr.tsx index 6f1e170b3e..057bb33cdb 100644 --- a/components/swapWidget/SwapWidgetNoSsr.tsx +++ b/components/swapWidget/SwapWidgetNoSsr.tsx @@ -2,12 +2,14 @@ import dynamic from 'next/dynamic' import { SwapWidgetSkeleton } from './SwapWidgetSkeleton' -export const SwapWidgetNoSsr = dynamic( - () => { - return import('./SwapWidget').then((component) => component.SwapWidget) - }, - { - ssr: false, - loading: SwapWidgetSkeleton, - }, -) +export const SwapWidgetNoSsr = !process.env.NEXT_PUBLIC_SWAP_WIDGET_ONBOARDING_HIDDEN + ? dynamic( + () => { + return import('./SwapWidget').then((component) => component.SwapWidget) + }, + { + ssr: false, + loading: SwapWidgetSkeleton, + }, + ) + : () => null diff --git a/features/productHub/components/ProductHubLoadingState.tsx b/features/productHub/components/ProductHubLoadingState.tsx index 3819150db2..539ee9b45d 100644 --- a/features/productHub/components/ProductHubLoadingState.tsx +++ b/features/productHub/components/ProductHubLoadingState.tsx @@ -10,10 +10,22 @@ export const ProductHubLoadingState: FC = () => { , - , - , - , + { + id: 'skeleton1', + component: , + }, + { + id: 'skeleton2', + component: , + }, + { + id: 'skeleton3', + component: , + }, + { + id: 'skeleton4', + component: , + }, ]} /> diff --git a/features/productHub/controls/ProductHubFiltersController.tsx b/features/productHub/controls/ProductHubFiltersController.tsx index 661c416c61..e0889d6181 100644 --- a/features/productHub/controls/ProductHubFiltersController.tsx +++ b/features/productHub/controls/ProductHubFiltersController.tsx @@ -49,10 +49,30 @@ export const ProductHubFiltersController: FC = key={selectedProduct} filters={[ ...(selectedProduct === OmniProductType.Earn - ? [depositTokenFilter] - : [collateralTokenFilter, debtTokenFilter]), - ...(!hiddenProtocolFilter ? [protocolFilter] : []), - ...(!hiddenNetworkFilter ? [networkFilter] : []), + ? [{ id: 'depositTokenFilter', component: depositTokenFilter }] + : [ + { id: 'collateralTokenFilter', component: collateralTokenFilter }, + { + id: 'debtTokenFilter', + component: debtTokenFilter, + }, + ]), + ...(!hiddenProtocolFilter + ? [ + { + id: 'protocolFilter', + component: protocolFilter, + }, + ] + : []), + ...(!hiddenNetworkFilter + ? [ + { + id: 'networkFilter', + component: networkFilter, + }, + ] + : []), ]} lastWithAutoOffset={!hiddenProtocolFilter && !hiddenNetworkFilter} > diff --git a/handlers/signature-auth/signin.ts b/handlers/signature-auth/signin.ts index 4350027567..1c5d65c500 100644 --- a/handlers/signature-auth/signin.ts +++ b/handlers/signature-auth/signin.ts @@ -69,7 +69,11 @@ export function makeSignIn(options: signInOptions): NextApiHandler { const isOwner = await checkIfGnosisOwner(web3, challenge, signedAddress) if (!isOwner) { - throw new SignatureAuthError('Signature not correct - personal sign') + // it might be a wallet connect + safe, no way to check + // that during connect/sign so im checking that here + if (!(await isValidSignature(web3, challenge.address, message, body.signature))) { + throw new SignatureAuthError('Signature not correct - personal sign') + } } } } diff --git a/theme/icons/arb_circle.tsx b/theme/icons/arb_circle.tsx index fa2978af18..6e6abbf6e5 100644 --- a/theme/icons/arb_circle.tsx +++ b/theme/icons/arb_circle.tsx @@ -36,8 +36,8 @@ export const arb_circle = { y2="16" gradientUnits="userSpaceOnUse" > - - + + diff --git a/theme/icons/bal_circle.tsx b/theme/icons/bal_circle.tsx index 1311808adf..2d2f378c0d 100644 --- a/theme/icons/bal_circle.tsx +++ b/theme/icons/bal_circle.tsx @@ -23,8 +23,8 @@ export const bal_circle = { y2="29.0001" gradientUnits="userSpaceOnUse" > - - + + diff --git a/theme/icons/crv_circle.tsx b/theme/icons/crv_circle.tsx index 53f96523d7..d08c810289 100644 --- a/theme/icons/crv_circle.tsx +++ b/theme/icons/crv_circle.tsx @@ -6039,8 +6039,8 @@ export const crv_circle = { y2="29" gradientUnits="userSpaceOnUse" > - - + + diff --git a/theme/icons/cseth.tsx b/theme/icons/cseth.tsx index d618f58f0c..5e16824c5a 100644 --- a/theme/icons/cseth.tsx +++ b/theme/icons/cseth.tsx @@ -45,11 +45,11 @@ export const cseth = { y2="29" gradientUnits="userSpaceOnUse" > - - - - - + + + + + diff --git a/theme/icons/mkr_circle_color.tsx b/theme/icons/mkr_circle_color.tsx index 3caa94254f..566d97076e 100644 --- a/theme/icons/mkr_circle_color.tsx +++ b/theme/icons/mkr_circle_color.tsx @@ -20,8 +20,8 @@ export const mkr_circle_color = { y2="29" gradientUnits="userSpaceOnUse" > - - + + diff --git a/theme/icons/mpeth.tsx b/theme/icons/mpeth.tsx index 06087a4b50..72b67b40e9 100644 --- a/theme/icons/mpeth.tsx +++ b/theme/icons/mpeth.tsx @@ -21,8 +21,8 @@ export const mpeth = { y2="24.5" gradientUnits="userSpaceOnUse" > - - + + diff --git a/theme/icons/op_circle.tsx b/theme/icons/op_circle.tsx index 1c4a801b4c..f7a84191c2 100644 --- a/theme/icons/op_circle.tsx +++ b/theme/icons/op_circle.tsx @@ -18,8 +18,8 @@ export const op_circle = { y2="16" gradientUnits="userSpaceOnUse" > - - + + diff --git a/theme/icons/styeth_circle_color.tsx b/theme/icons/styeth_circle_color.tsx index be88b8ad6d..d72ce8cf0d 100644 --- a/theme/icons/styeth_circle_color.tsx +++ b/theme/icons/styeth_circle_color.tsx @@ -20,8 +20,8 @@ export const styeth_circle_color = { y2="6" gradientUnits="userSpaceOnUse" > - - + + diff --git a/theme/icons/susd_circle.tsx b/theme/icons/susd_circle.tsx index 255fd2f701..23b9aa8cc2 100644 --- a/theme/icons/susd_circle.tsx +++ b/theme/icons/susd_circle.tsx @@ -46,8 +46,8 @@ export const susd_circle = { y2="41.0151" gradientUnits="userSpaceOnUse" > - - + + diff --git a/theme/icons/unieth.tsx b/theme/icons/unieth.tsx index d0cd92c030..000b65ab1f 100644 --- a/theme/icons/unieth.tsx +++ b/theme/icons/unieth.tsx @@ -42,8 +42,8 @@ export const unieth = { y2="24.5" gradientUnits="userSpaceOnUse" > - - + +