diff --git a/packages/demo/index.tsx b/packages/demo/index.tsx
index ef7da65ae..4a9ebe030 100644
--- a/packages/demo/index.tsx
+++ b/packages/demo/index.tsx
@@ -56,6 +56,9 @@ const App = () => {
onRevealConnectedIdentityCommitment,
} = useCryptKeeper();
+ const params = new URLSearchParams(window.location.search);
+ const canShowReveal = process.env.REVEAL_IDENTITY === "true" || params.get("REVEAL_IDENTITY") === "true";
+
useEffect(() => {
connect();
}, [connect]);
@@ -128,7 +131,7 @@ const App = () => {
- {process.env.REVEAL_IDENTITY === "true" && (
+ {canShowReveal && (
Reveal connected identity Commitment
diff --git a/packages/e2e/tests/revealIdentityCommitment.test.ts b/packages/e2e/tests/revealIdentityCommitment.test.ts
index df1bf5f6d..f48acbd55 100644
--- a/packages/e2e/tests/revealIdentityCommitment.test.ts
+++ b/packages/e2e/tests/revealIdentityCommitment.test.ts
@@ -11,7 +11,7 @@ test.describe("reveal identity commitment", () => {
await connectWallet({ page, cryptKeeperExtensionId, context });
await expect(page.getByText("Connected to MetaMask")).toBeVisible();
- await page.goto("/");
+ await page.goto("/?REVEAL_IDENTITY=true");
});
test("should reveal connected identity commitment properly [health-check]", async ({ page }) => {
@@ -43,7 +43,7 @@ test.describe("reveal identity commitment", () => {
cryptKeeperExtensionId,
}) => {
const demoApp = await context.newPage();
- await demoApp.goto("/");
+ await demoApp.goto("/?REVEAL_IDENTITY=true");
const cryptKeeper = await context.newPage();
await cryptKeeper.bringToFront();