diff --git a/lib/contexts/marketplace.tsx b/lib/contexts/marketplace.tsx index 2aba76e39b..59c7b34bc5 100644 --- a/lib/contexts/marketplace.tsx +++ b/lib/contexts/marketplace.tsx @@ -10,7 +10,7 @@ type TMarketplaceContext = { setIsAutoConnectDisabled: (isAutoConnectDisabled: boolean) => void; } -const MarketplaceContext = createContext({ +export const MarketplaceContext = createContext({ isAutoConnectDisabled: false, setIsAutoConnectDisabled: () => {}, }); diff --git a/nextjs/utils/fetchProxy.ts b/nextjs/utils/fetchProxy.ts index 693fa2a996..0c52c9f80e 100644 --- a/nextjs/utils/fetchProxy.ts +++ b/nextjs/utils/fetchProxy.ts @@ -32,8 +32,8 @@ export default function fetchFactory( httpLogger.logger.info({ message: 'API fetch via Next.js proxy', url, - headers, - init, + // headers, + // init, }); const body = (() => { diff --git a/playwright/TestApp.tsx b/playwright/TestApp.tsx index 540afac5ac..07b5c12b34 100644 --- a/playwright/TestApp.tsx +++ b/playwright/TestApp.tsx @@ -10,6 +10,7 @@ import type { Props as PageProps } from 'nextjs/getServerSideProps'; import config from 'configs/app'; import { AppContextProvider } from 'lib/contexts/app'; +import { MarketplaceContext } from 'lib/contexts/marketplace'; import { SocketProvider } from 'lib/socket/context'; import currentChain from 'lib/web3/currentChain'; import theme from 'theme/theme'; @@ -23,6 +24,10 @@ export type Props = { appContext?: { pageProps: PageProps; }; + marketplaceContext?: { + isAutoConnectDisabled: boolean; + setIsAutoConnectDisabled: (isAutoConnectDisabled: boolean) => void; + }; } const defaultAppContext = { @@ -35,6 +40,11 @@ const defaultAppContext = { }, }; +const defaultMarketplaceContext = { + isAutoConnectDisabled: false, + setIsAutoConnectDisabled: () => {}, +}; + const wagmiConfig = createConfig({ chains: [ currentChain ], connectors: [ @@ -49,7 +59,7 @@ const wagmiConfig = createConfig({ }, }); -const TestApp = ({ children, withSocket, appContext = defaultAppContext }: Props) => { +const TestApp = ({ children, withSocket, appContext = defaultAppContext, marketplaceContext = defaultMarketplaceContext }: Props) => { const [ queryClient ] = React.useState(() => new QueryClient({ defaultOptions: { queries: { @@ -64,11 +74,13 @@ const TestApp = ({ children, withSocket, appContext = defaultAppContext }: Props - - - { children } - - + + + + { children } + + + diff --git a/ui/snippets/auth/screens/AuthModalScreenOtpCode.tsx b/ui/snippets/auth/screens/AuthModalScreenOtpCode.tsx index 09ebbac52a..73e7047c79 100644 --- a/ui/snippets/auth/screens/AuthModalScreenOtpCode.tsx +++ b/ui/snippets/auth/screens/AuthModalScreenOtpCode.tsx @@ -86,7 +86,6 @@ const AuthModalScreenOtpCode = ({ email, onSuccess, isAuth }: Props) => { description: 'Code has been sent to your email', }); } catch (error) { - // TODO @tom2drum check cool down error const apiError = getErrorObjPayload<{ message: string }>(error); toast({ diff --git a/ui/snippets/user/profile/UserProfileDesktop.pw.tsx b/ui/snippets/user/profile/UserProfileDesktop.pw.tsx index 5179d61206..67c6fb0fc3 100644 --- a/ui/snippets/user/profile/UserProfileDesktop.pw.tsx +++ b/ui/snippets/user/profile/UserProfileDesktop.pw.tsx @@ -13,11 +13,11 @@ const test = base.extend<{ context: BrowserContext }>({ test('without address', async({ render, page, mockApiResponse }) => { await mockApiResponse('user_info', profileMock.base); - await render(); + await render(, undefined, { marketplaceContext: { isAutoConnectDisabled: true, setIsAutoConnectDisabled: () => {} } }); await page.getByText(/tom/i).click(); await expect(page).toHaveScreenshot({ - clip: { x: 0, y: 0, width: 300, height: 600 }, + clip: { x: 0, y: 0, width: 300, height: 700 }, }); }); diff --git a/ui/snippets/user/profile/__screenshots__/UserProfileDesktop.pw.tsx_default_without-address-1.png b/ui/snippets/user/profile/__screenshots__/UserProfileDesktop.pw.tsx_default_without-address-1.png index 8e7b10ed98..ed1e46b093 100644 Binary files a/ui/snippets/user/profile/__screenshots__/UserProfileDesktop.pw.tsx_default_without-address-1.png and b/ui/snippets/user/profile/__screenshots__/UserProfileDesktop.pw.tsx_default_without-address-1.png differ