From fd63ceacaf9b190d43dbaf6a382d13525e45cdf0 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 8 Sep 2025 11:13:32 -0700 Subject: check for syncSquare --- lib/register.ts | 2 +- lib/square.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/register.ts b/lib/register.ts index 8e999e76..8b893d6c 100644 --- a/lib/register.ts +++ b/lib/register.ts @@ -2,7 +2,7 @@ import config from "$config"; import countries from "$lib/countries"; import { db, s } from "$lib/db"; import { l, warn } from "$lib/logging"; -import { fail, getUser } from "$lib/utils"; +import { fail } from "$lib/utils"; import { bytesToHex, randomBytes } from "@noble/hashes/utils"; import { got } from "got"; import { getPublicKey, nip19 } from "nostr-tools"; diff --git a/lib/square.ts b/lib/square.ts index f491effe..272d9872 100644 --- a/lib/square.ts +++ b/lib/square.ts @@ -8,7 +8,7 @@ const { appId, environment } = config.square; export const squarePayment = async (p, user) => { let square = await g(`${user.id}:square`); - if (!square) return; + if (!(square && user.syncSquare)) return; let client = new SquareClient({ environment, -- cgit v1.2.3