From 83f9bb3c4e98d48c5c729f9479a741496dab4bbe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 20:34:11 +0000 Subject: [PATCH 1/2] Initial plan From 2342e8428f1f7cc67fdc91f1d149fae0717d77f7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 20:36:46 +0000 Subject: [PATCH 2/2] Fix merchants route type narrowing for CI typecheck Co-authored-by: Rumblingb <190477445+Rumblingb@users.noreply.github.com> --- apps/api-edge/src/routes/merchants.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/api-edge/src/routes/merchants.ts b/apps/api-edge/src/routes/merchants.ts index 56b8af0..410b533 100644 --- a/apps/api-edge/src/routes/merchants.ts +++ b/apps/api-edge/src/routes/merchants.ts @@ -281,7 +281,7 @@ router.post('/register', async (c) => { if (!name || typeof name !== 'string' || name.length < 3 || name.length > 255) { return c.json({ error: 'Validation error', details: ['"name" must be 3–255 characters'] }, 400); } - if (!email || !isValidEmail(email)) { + if (typeof email !== 'string' || !isValidEmail(email)) { return c.json({ error: 'Validation error', details: ['"email" must be a valid email'] }, 400); } // walletAddress is optional — only validate format when provided @@ -289,7 +289,11 @@ router.post('/register', async (c) => { (typeof walletAddress !== 'string' || walletAddress.length < 32 || walletAddress.length > 44)) { return c.json({ error: 'Validation error', details: ['"walletAddress" must be a valid Solana address (32–44 characters)'] }, 400); } - if (webhookUrl !== undefined && webhookUrl !== null && !isValidUri(webhookUrl as string)) { + if ( + webhookUrl !== undefined && + webhookUrl !== null && + (typeof webhookUrl !== 'string' || !isValidUri(webhookUrl)) + ) { return c.json({ error: 'Validation error', details: ['"webhookUrl" must be a valid URI'] }, 400); }