aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-11-25 09:25:18 -0700
committerAdam Soltys <[email protected]>2026-11-25 09:25:18 -0700
commite0ac891b4c3275b5bb228fd53b507d1c61ff88ea (patch)
tree29d1d4a20b0a89b7f69157d5ec46413c5a423919
parentcdd086afc3044d9c8beefb0cc1abc307d1e4557e (diff)
downloadcoinos-server-e0ac891b4c3275b5bb228fd53b507d1c61ff88ea.tar.gz
coinos-server-e0ac891b4c3275b5bb228fd53b507d1c61ff88ea.zip
remove the Shopify webhook integration; add a migration kill switch
Drop the /shopify route and the shopify user fields. POST /user with `migrated` fails while migrate:disabled is set, which stops the UI migration hand-off before the registrar grant is issued. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
-rw-r--r--index.ts3
-rw-r--r--lib/types.ts2
-rw-r--r--lib/whitelist.ts2
-rw-r--r--routes/users.ts8
4 files changed, 6 insertions, 9 deletions
diff --git a/index.ts b/index.ts
index 17f776ec..81cb2743 100644
--- a/index.ts
+++ b/index.ts
@@ -20,7 +20,6 @@ import nostr from "$routes/nostr";
import payments from "$routes/payments";
import preimages from "$routes/preimages";
import rates from "$routes/rates";
-import shopify from "$routes/shopify";
import square from "$routes/square";
import users from "$routes/users";
@@ -194,8 +193,6 @@ app.post("/items", auth, items.create);
app.post("/items/delete", auth, items.del);
app.post("/items/sort", auth, items.sort);
-app.post("/shopify/:id", shopify);
-
app.get("/bolt12", fixBolt12);
app.get("/cash/:id/:version", ecash.get);
diff --git a/lib/types.ts b/lib/types.ts
index 802fe995..553a50b5 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -35,8 +35,6 @@ export interface User {
push: string;
reserve: string;
seed: string;
- shopifyStore: string;
- shopifyToken: string;
theme: string;
threshold: string;
twofa: string;
diff --git a/lib/whitelist.ts b/lib/whitelist.ts
index f305f516..96733984 100644
--- a/lib/whitelist.ts
+++ b/lib/whitelist.ts
@@ -37,8 +37,6 @@ export default [
"push",
"reserve",
"seed",
- "shopifyStore",
- "shopifyToken",
"theme",
"threshold",
"tip",
diff --git a/routes/users.ts b/routes/users.ts
index 77ddbdc6..a058e7da 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -386,6 +386,12 @@ export default {
l("updating user", user.username, tokid);
if (user.id !== tokid) fail("unauthorized");
+ // Kill switch for the v3 migration hand-off (`migrate:disabled`). The
+ // UI's migrate action marks the account here before it asks the
+ // registrar to grant the name, so failing this stops the grant.
+ if (typeof body.migrated !== "undefined" && (await db.get("migrate:disabled")))
+ fail("Migration is temporarily unavailable");
+
const { confirm, password, pin, newpin } = body;
const username = body?.username?.toLowerCase().replace(/\s/g, "");
const valid = /^[\p{L}\p{N}]{2,24}$/u;
@@ -476,8 +482,6 @@ export default {
"push",
"reserve",
"seed",
- "shopifyStore",
- "shopifyToken",
"threshold",
"tip",
"tokens",