From b53f6dca21f92343132c9f1a742ce5a61b0f6e47 Mon Sep 17 00:00:00 2001 From: xmrcheckout Date: Tue, 6 Jan 2026 16:06:39 +0000 Subject: [PATCH] Change default confirmation target to 2 --- api/app/main.py | 4 ++-- api/app/models.py | 2 +- api/app/schemas.py | 8 ++++---- ui/app/(app)/dashboard/page.tsx | 4 ++-- ui/app/(marketing)/docs/integrations/page.tsx | 8 ++++---- ui/app/(marketing)/docs/page.tsx | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/api/app/main.py b/api/app/main.py index d869ed4..2c3e829 100644 --- a/api/app/main.py +++ b/api/app/main.py @@ -183,7 +183,7 @@ def startup(): connection.execute( text( "ALTER TABLE users " - "ADD COLUMN IF NOT EXISTS default_confirmation_target INTEGER DEFAULT 10" + "ADD COLUMN IF NOT EXISTS default_confirmation_target INTEGER DEFAULT 2" ) ) connection.execute( @@ -218,7 +218,7 @@ def startup(): ) connection.execute( text( - "UPDATE users SET default_confirmation_target = 10 " + "UPDATE users SET default_confirmation_target = 2 " "WHERE default_confirmation_target IS NULL" ) ) diff --git a/api/app/models.py b/api/app/models.py index 65750f3..86cb3f0 100644 --- a/api/app/models.py +++ b/api/app/models.py @@ -125,7 +125,7 @@ class User(Base): webhook_secret_encrypted = Column(String, nullable=True) next_subaddress_index = Column(Integer, nullable=False, server_default="1") subaddress_start_index = Column(Integer, nullable=False, server_default="0") - default_confirmation_target = Column(Integer, nullable=False, server_default="10") + default_confirmation_target = Column(Integer, nullable=False, server_default="2") default_qr_logo = Column(String, nullable=False, server_default="monero") default_qr_logo_data_url = Column(String, nullable=True) btcpay_checkout_style = Column(String, nullable=False, server_default="standard") diff --git a/api/app/schemas.py b/api/app/schemas.py index a94608d..5d95c3d 100644 --- a/api/app/schemas.py +++ b/api/app/schemas.py @@ -25,7 +25,7 @@ class InvoiceCreate(BaseModel): amount_xmr: Decimal | None = Field(default=None, gt=0) amount_fiat: Decimal | None = Field(default=None, gt=0) currency: str | None = None - confirmation_target: conint(ge=0, le=10) = 10 + confirmation_target: conint(ge=0, le=10) = 2 metadata: dict[str, Any] | None = None expires_at: datetime | None = Field( default=None, @@ -52,7 +52,7 @@ class InvoiceCreate(BaseModel): class DonationCreate(BaseModel): amount_xmr: Decimal = Field(gt=0) - confirmation_target: conint(ge=0, le=10) = 10 + confirmation_target: conint(ge=0, le=10) = 2 class InvoiceResponse(BaseModel): @@ -89,7 +89,7 @@ class InvoiceCreateUser(BaseModel): amount_xmr: Decimal | None = Field(default=None, gt=0) amount_fiat: Decimal | None = Field(default=None, gt=0) currency: str | None = None - confirmation_target: conint(ge=0, le=10) = 10 + confirmation_target: conint(ge=0, le=10) = 2 metadata: dict[str, Any] | None = None expires_at: datetime | None = Field( default=None, @@ -153,7 +153,7 @@ class ProfileResponse(BaseModel): id: UUID payment_address: str - default_confirmation_target: conint(ge=0, le=10) = 10 + default_confirmation_target: conint(ge=0, le=10) = 2 default_qr_logo: QrLogoMode = "monero" default_qr_logo_data_url: str | None = None btcpay_checkout_style: BtcpayCheckoutStyle = "standard" diff --git a/ui/app/(app)/dashboard/page.tsx b/ui/app/(app)/dashboard/page.tsx index 1b2a380..7a5d8cd 100644 --- a/ui/app/(app)/dashboard/page.tsx +++ b/ui/app/(app)/dashboard/page.tsx @@ -359,7 +359,7 @@ export default async function DashboardPage({ searchQuery={invoiceSearchQuery} sort={invoiceSort} order={invoiceOrder} - defaultConfirmationTarget={profileData?.default_confirmation_target ?? 10} + defaultConfirmationTarget={profileData?.default_confirmation_target ?? 2} /> ) : null} {activeTab === "profile" ? ( @@ -417,7 +417,7 @@ export default async function DashboardPage({
diff --git a/ui/app/(marketing)/docs/integrations/page.tsx b/ui/app/(marketing)/docs/integrations/page.tsx index d567c40..d01b54e 100644 --- a/ui/app/(marketing)/docs/integrations/page.tsx +++ b/ui/app/(marketing)/docs/integrations/page.tsx @@ -207,7 +207,7 @@ curl -sS -X POST "$XMRCHECKOUT_API_BASE_URL/invoices" \\ -H "Content-Type: application/json" \\ -d '{ "amount_xmr": "0.15", - "confirmation_target": 10, + "confirmation_target": 2, "metadata": { "order_id": "ORDER-1234" } }'`} @@ -220,7 +220,7 @@ curl -sS -X POST "$XMRCHECKOUT_API_BASE_URL/invoices" \\ -d '{ "amount_fiat": "100.00", "currency": "USD", - "confirmation_target": 10, + "confirmation_target": 2, "metadata": { "order_id": "ORDER-1234" } }'`} @@ -397,7 +397,7 @@ response = requests.post( headers={"Authorization": f"ApiKey {api_key}"}, json={ "amount_xmr": "0.15", - "confirmation_target": 10, + "confirmation_target": 2, "metadata": {"order_id": "ORDER-1234"}, }, timeout=10, @@ -470,7 +470,7 @@ func main() { payload := map[string]any{ "amount_xmr": "0.15", - "confirmation_target": 10, + "confirmation_target": 2, "metadata": map[string]any{ "order_id": "ORDER-1234", }, diff --git a/ui/app/(marketing)/docs/page.tsx b/ui/app/(marketing)/docs/page.tsx index 56a38c6..28682f9 100644 --- a/ui/app/(marketing)/docs/page.tsx +++ b/ui/app/(marketing)/docs/page.tsx @@ -351,7 +351,7 @@ const endpointRequirements = [ auth: "API key", required: ["amount_xmr or amount_fiat + currency"], optional: [ - "confirmation_target (default 10, 0-10)", + "confirmation_target (default 2, 0-10)", "metadata", "expires_at (ISO 8601)", ], @@ -613,7 +613,7 @@ Content-Type: application/json { "amount_fiat": "100.00", "currency": "USD", - "confirmation_target": 10, + "confirmation_target": 2, "metadata": { "order_id": "ORDER-1234" } }`}