diff --git a/.github/workflows/build-upload-deploy-prod.yml b/.github/workflows/build-upload-deploy-prod.yml index b6c636768d..9d48d9babf 100644 --- a/.github/workflows/build-upload-deploy-prod.yml +++ b/.github/workflows/build-upload-deploy-prod.yml @@ -1,4 +1,4 @@ -name: Build - Upload to S3 - Deploy to Elastic Beanstalk +name: Web Deploy - PROD on: workflow_dispatch diff --git a/.gitignore b/.gitignore index b7af65d03a..c8c085a861 100644 --- a/.gitignore +++ b/.gitignore @@ -18,9 +18,12 @@ storageState.json # next.js /.next/ /out/ - -# production -/build +# standalone/standalone-memes-mint +/standalone/standalone-memes-mint/src/.next/ +/standalone/standalone-memes-mint/src/.next-static-export/ +/standalone/standalone-memes-mint/src/out/ +/standalone/standalone-memes-mint/src/public/ +/standalone/standalone-memes-mint/dist/ # misc .DS_Store diff --git a/__tests__/components/manifold-minting/ManifoldMinting.test.tsx b/__tests__/components/manifold-minting/ManifoldMinting.test.tsx index 534195262d..338f507602 100644 --- a/__tests__/components/manifold-minting/ManifoldMinting.test.tsx +++ b/__tests__/components/manifold-minting/ManifoldMinting.test.tsx @@ -119,8 +119,9 @@ jest.mock("@/hooks/useManifoldClaim", () => { }); // Mock the constants -jest.mock("@/constants", () => ({ +jest.mock("@/constants/constants", () => ({ ETHEREUM_ICON_TEXT: "Ξ", + MANIFOLD_LAZY_CLAIM_CONTRACT: "0x2", MEMES_CONTRACT: "0x33FD426905F149f8376e227d0C9D3340AaD17aF1", })); @@ -165,6 +166,7 @@ const createMockClaim = (overrides = {}) => ({ const defaultProps = { title: "Test Meme", contract: "0x33FD426905F149f8376e227d0C9D3340AaD17aF1", + chain: { id: 1 } as any, proxy: "0x2", abi: {}, token_id: 123, diff --git a/__tests__/components/manifold-minting/ManifoldMintingConnect.test.tsx b/__tests__/components/manifold-minting/ManifoldMintingConnect.test.tsx index d5a8104b8a..40ab31c63c 100644 --- a/__tests__/components/manifold-minting/ManifoldMintingConnect.test.tsx +++ b/__tests__/components/manifold-minting/ManifoldMintingConnect.test.tsx @@ -113,6 +113,16 @@ describe("ManifoldMintingConnect", () => { expect(screen.getByTestId("header-connect")).toBeInTheDocument(); }); + it("hides connect prompt in standalone when not connected", () => { + (mockedConnect as jest.Mock).mockReturnValue({ isConnected: false }); + render( + + + + ); + expect(screen.queryByTestId("header-connect")).not.toBeInTheDocument(); + }); + it("calls onMintFor with account address on mount", () => { const { onMintFor, seizeCtx } = renderConnected(); expect(onMintFor).toHaveBeenCalledWith(seizeCtx.address); diff --git a/__tests__/components/manifold-minting/ManifoldMintingPhases.test.tsx b/__tests__/components/manifold-minting/ManifoldMintingPhases.test.tsx new file mode 100644 index 0000000000..641ffa1316 --- /dev/null +++ b/__tests__/components/manifold-minting/ManifoldMintingPhases.test.tsx @@ -0,0 +1,315 @@ +import ManifoldMinting from "@/components/manifold-minting/ManifoldMinting"; +import { render, screen, waitFor } from "@testing-library/react"; +import userEvent from "@testing-library/user-event"; + +const mockUseManifoldClaim = jest.fn(); + +jest.mock("next/image", () => ({ + __esModule: true, + default: (props: any) => {props.alt, +})); + +jest.mock("next/link", () => ({ + __esModule: true, + default: ({ href, children, ...props }: any) => ( + + {children} + + ), +})); + +jest.mock("@reown/appkit/react", () => ({ + AppKitButton: () =>
, +})); + +jest.mock("@/components/drop-forge/DropForgeTestnetIndicator", () => ({ + __esModule: true, + default: () =>
, +})); + +jest.mock("@/components/home/now-minting/NowMintingCountdown", () => ({ + __esModule: true, + default: () =>
, +})); + +jest.mock("@/components/manifold-minting/ManifoldMintingWidget", () => ({ + __esModule: true, + default: (props: { setMintForAddress?: (address: string | null) => void }) => ( + - - - + {enableWalletAuthentication && ( + { + // Only allow modal dismissal when not actively validating + if (authLoadingState !== "validating") { + setShowSignModal(false); + } + }} + backdrop="static" + keyboard={false} + centered + dialogClassName={styles["signModalDialog"] ?? ""} + contentClassName={styles["signModalSurface"] ?? ""} + > + +
+ Sign Authentication Request +
+
+ +

+ To connect your wallet, you will need to sign a message to confirm + your identity. +

+ +
    +
  • + This signature will be used to generate a secure token (JWT) to + authenticate your session. +
  • +
  • + Your signature will not cost any gas and is purely for + authentication purposes. +
  • +
+
+ + + + +
+ )} ); } diff --git a/components/common/SandboxedExternalIframe.tsx b/components/common/SandboxedExternalIframe.tsx index c9e05801a2..b771ea856a 100644 --- a/components/common/SandboxedExternalIframe.tsx +++ b/components/common/SandboxedExternalIframe.tsx @@ -14,6 +14,12 @@ interface SandboxedExternalIframeProps { readonly className?: string | undefined; readonly fallback?: React.ReactNode | undefined; readonly containerClassName?: string | undefined; + readonly onLoad?: + | React.IframeHTMLAttributes["onLoad"] + | undefined; + readonly onError?: + | React.IframeHTMLAttributes["onError"] + | undefined; } /** @@ -31,6 +37,8 @@ const SandboxedExternalIframe: React.FC = ({ className, fallback = null, containerClassName, + onLoad, + onError, }) => { const containerRef = useRef(null); const [isVisible, setIsVisible] = useState(false); @@ -96,6 +104,14 @@ const SandboxedExternalIframe: React.FC = ({ } }, [canonicalSrc]); + const iframeTitle = useMemo(() => { + if (!canonicalSrc) { + return title; + } + + return `${title}: ${canonicalSrc}`; + }, [canonicalSrc, title]); + const iframeProps = useMemo(() => { if (!canonicalSrc) { return null; @@ -103,7 +119,6 @@ const SandboxedExternalIframe: React.FC = ({ const baseProps = { src: canonicalSrc, - title, sandbox: DEFAULT_SANDBOX, // `allow=""` intentionally denies all Permission Policy features beyond the sandbox defaults. allow: "", @@ -119,7 +134,7 @@ const SandboxedExternalIframe: React.FC = ({ baseProps.className = frameClassName; return baseProps; - }, [canonicalSrc, frameClassName, title]); + }, [canonicalSrc, frameClassName]); if (!canonicalSrc || !iframeProps) { return fallback ? <>{fallback} : null; @@ -165,7 +180,16 @@ const SandboxedExternalIframe: React.FC = ({
{banner}
- {isVisible ?