remove em dashes

This commit is contained in:
2026-04-09 21:07:28 +04:00
parent 5f20b41e91
commit 79ba63d86b
31 changed files with 154 additions and 154 deletions
+3 -3
View File
@@ -29,7 +29,7 @@ describe("insertIntoStack", () => {
.toEqual([{ plan: "pro", remaining_days: 50 }]);
});
test("merges same plan null wins (lifetime)", () => {
test("merges same plan - null wins (lifetime)", () => {
const stack = [{ plan: "lifetime", remaining_days: null }];
expect(insertIntoStack(stack, { plan: "lifetime", remaining_days: null }))
.toEqual([{ plan: "lifetime", remaining_days: null }]);
@@ -92,7 +92,7 @@ describe("computeApplyPlan", () => {
expect(result.plan_stack).toEqual([{ plan: "lifetime", remaining_days: null }]);
});
test("pro4x (15d left) buys lifetime goes to stack", () => {
test("pro4x (15d left) buys lifetime - goes to stack", () => {
const acc = { plan: "pro4x", plan_expires_at: daysFromNow(15), plan_stack: [] };
const result = computeApplyPlan(acc, { plan: "lifetime", months: null }, now);
expect(result.plan).toBe("pro4x"); // stays active (higher tier)
@@ -121,7 +121,7 @@ describe("computeApplyPlan", () => {
expect(result.plan_stack).toEqual([]);
});
test("free with existing stack preserves stack", () => {
test("free with existing stack - preserves stack", () => {
const acc = { plan: "free", plan_expires_at: null, plan_stack: [{ plan: "lifetime", remaining_days: null }] };
const result = computeApplyPlan(acc, { plan: "pro", months: 1 }, now);
expect(result.plan).toBe("pro");
+1 -1
View File
@@ -33,7 +33,7 @@ async function refreshMaps() {
}
async function recordTx(paymentId: number, address: string, txid: string, amount: number, confirmed: boolean) {
// Verify the payment exists and the address matches prevents stale in-memory state
// Verify the payment exists and the address matches - prevents stale in-memory state
// from attributing transactions to the wrong payment
const [payment] = await sql`
SELECT id FROM payments WHERE id = ${paymentId} AND address = ${address}
+1 -1
View File
@@ -16,7 +16,7 @@ export async function generateReceipt(paymentId: number): Promise<string> {
const paidDate = payment.paid_at
? new Date(payment.paid_at).toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric" })
: "";
: "-";
const createdDate = new Date(payment.created_at).toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric" });
const planNames: Record<string, string> = { pro: "Pro", pro2x: "Pro 2x", pro4x: "Pro 4x", lifetime: "Lifetime" };
const planName = planNames[payment.plan] || payment.plan;