mirror of
https://github.com/Such-Software/xmrcheckout.git
synced 2026-10-17 05:51:34 +02:00
Change default confirmation target to 2
This commit is contained in:
+2
-2
@@ -183,7 +183,7 @@ def startup():
|
|||||||
connection.execute(
|
connection.execute(
|
||||||
text(
|
text(
|
||||||
"ALTER TABLE users "
|
"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(
|
connection.execute(
|
||||||
@@ -218,7 +218,7 @@ def startup():
|
|||||||
)
|
)
|
||||||
connection.execute(
|
connection.execute(
|
||||||
text(
|
text(
|
||||||
"UPDATE users SET default_confirmation_target = 10 "
|
"UPDATE users SET default_confirmation_target = 2 "
|
||||||
"WHERE default_confirmation_target IS NULL"
|
"WHERE default_confirmation_target IS NULL"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -125,7 +125,7 @@ class User(Base):
|
|||||||
webhook_secret_encrypted = Column(String, nullable=True)
|
webhook_secret_encrypted = Column(String, nullable=True)
|
||||||
next_subaddress_index = Column(Integer, nullable=False, server_default="1")
|
next_subaddress_index = Column(Integer, nullable=False, server_default="1")
|
||||||
subaddress_start_index = Column(Integer, nullable=False, server_default="0")
|
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 = Column(String, nullable=False, server_default="monero")
|
||||||
default_qr_logo_data_url = Column(String, nullable=True)
|
default_qr_logo_data_url = Column(String, nullable=True)
|
||||||
btcpay_checkout_style = Column(String, nullable=False, server_default="standard")
|
btcpay_checkout_style = Column(String, nullable=False, server_default="standard")
|
||||||
|
|||||||
+4
-4
@@ -25,7 +25,7 @@ class InvoiceCreate(BaseModel):
|
|||||||
amount_xmr: Decimal | None = Field(default=None, gt=0)
|
amount_xmr: Decimal | None = Field(default=None, gt=0)
|
||||||
amount_fiat: Decimal | None = Field(default=None, gt=0)
|
amount_fiat: Decimal | None = Field(default=None, gt=0)
|
||||||
currency: str | None = None
|
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
|
metadata: dict[str, Any] | None = None
|
||||||
expires_at: datetime | None = Field(
|
expires_at: datetime | None = Field(
|
||||||
default=None,
|
default=None,
|
||||||
@@ -52,7 +52,7 @@ class InvoiceCreate(BaseModel):
|
|||||||
|
|
||||||
class DonationCreate(BaseModel):
|
class DonationCreate(BaseModel):
|
||||||
amount_xmr: Decimal = Field(gt=0)
|
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):
|
class InvoiceResponse(BaseModel):
|
||||||
@@ -89,7 +89,7 @@ class InvoiceCreateUser(BaseModel):
|
|||||||
amount_xmr: Decimal | None = Field(default=None, gt=0)
|
amount_xmr: Decimal | None = Field(default=None, gt=0)
|
||||||
amount_fiat: Decimal | None = Field(default=None, gt=0)
|
amount_fiat: Decimal | None = Field(default=None, gt=0)
|
||||||
currency: str | None = None
|
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
|
metadata: dict[str, Any] | None = None
|
||||||
expires_at: datetime | None = Field(
|
expires_at: datetime | None = Field(
|
||||||
default=None,
|
default=None,
|
||||||
@@ -153,7 +153,7 @@ class ProfileResponse(BaseModel):
|
|||||||
|
|
||||||
id: UUID
|
id: UUID
|
||||||
payment_address: str
|
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: QrLogoMode = "monero"
|
||||||
default_qr_logo_data_url: str | None = None
|
default_qr_logo_data_url: str | None = None
|
||||||
btcpay_checkout_style: BtcpayCheckoutStyle = "standard"
|
btcpay_checkout_style: BtcpayCheckoutStyle = "standard"
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ export default async function DashboardPage({
|
|||||||
searchQuery={invoiceSearchQuery}
|
searchQuery={invoiceSearchQuery}
|
||||||
sort={invoiceSort}
|
sort={invoiceSort}
|
||||||
order={invoiceOrder}
|
order={invoiceOrder}
|
||||||
defaultConfirmationTarget={profileData?.default_confirmation_target ?? 10}
|
defaultConfirmationTarget={profileData?.default_confirmation_target ?? 2}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{activeTab === "profile" ? (
|
{activeTab === "profile" ? (
|
||||||
@@ -417,7 +417,7 @@ export default async function DashboardPage({
|
|||||||
</div>
|
</div>
|
||||||
<div className="rounded-2xl border border-stroke bg-white/70 p-6 shadow-soft">
|
<div className="rounded-2xl border border-stroke bg-white/70 p-6 shadow-soft">
|
||||||
<DefaultConfirmationTargetSection
|
<DefaultConfirmationTargetSection
|
||||||
initialValue={profileData?.default_confirmation_target ?? 10}
|
initialValue={profileData?.default_confirmation_target ?? 2}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="rounded-2xl border border-stroke bg-white/70 p-6 shadow-soft">
|
<div className="rounded-2xl border border-stroke bg-white/70 p-6 shadow-soft">
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ curl -sS -X POST "$XMRCHECKOUT_API_BASE_URL/invoices" \\
|
|||||||
-H "Content-Type: application/json" \\
|
-H "Content-Type: application/json" \\
|
||||||
-d '{
|
-d '{
|
||||||
"amount_xmr": "0.15",
|
"amount_xmr": "0.15",
|
||||||
"confirmation_target": 10,
|
"confirmation_target": 2,
|
||||||
"metadata": { "order_id": "ORDER-1234" }
|
"metadata": { "order_id": "ORDER-1234" }
|
||||||
}'`}</code>
|
}'`}</code>
|
||||||
</pre>
|
</pre>
|
||||||
@@ -220,7 +220,7 @@ curl -sS -X POST "$XMRCHECKOUT_API_BASE_URL/invoices" \\
|
|||||||
-d '{
|
-d '{
|
||||||
"amount_fiat": "100.00",
|
"amount_fiat": "100.00",
|
||||||
"currency": "USD",
|
"currency": "USD",
|
||||||
"confirmation_target": 10,
|
"confirmation_target": 2,
|
||||||
"metadata": { "order_id": "ORDER-1234" }
|
"metadata": { "order_id": "ORDER-1234" }
|
||||||
}'`}</code>
|
}'`}</code>
|
||||||
</pre>
|
</pre>
|
||||||
@@ -397,7 +397,7 @@ response = requests.post(
|
|||||||
headers={"Authorization": f"ApiKey {api_key}"},
|
headers={"Authorization": f"ApiKey {api_key}"},
|
||||||
json={
|
json={
|
||||||
"amount_xmr": "0.15",
|
"amount_xmr": "0.15",
|
||||||
"confirmation_target": 10,
|
"confirmation_target": 2,
|
||||||
"metadata": {"order_id": "ORDER-1234"},
|
"metadata": {"order_id": "ORDER-1234"},
|
||||||
},
|
},
|
||||||
timeout=10,
|
timeout=10,
|
||||||
@@ -470,7 +470,7 @@ func main() {
|
|||||||
|
|
||||||
payload := map[string]any{
|
payload := map[string]any{
|
||||||
"amount_xmr": "0.15",
|
"amount_xmr": "0.15",
|
||||||
"confirmation_target": 10,
|
"confirmation_target": 2,
|
||||||
"metadata": map[string]any{
|
"metadata": map[string]any{
|
||||||
"order_id": "ORDER-1234",
|
"order_id": "ORDER-1234",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ const endpointRequirements = [
|
|||||||
auth: "API key",
|
auth: "API key",
|
||||||
required: ["amount_xmr or amount_fiat + currency"],
|
required: ["amount_xmr or amount_fiat + currency"],
|
||||||
optional: [
|
optional: [
|
||||||
"confirmation_target (default 10, 0-10)",
|
"confirmation_target (default 2, 0-10)",
|
||||||
"metadata",
|
"metadata",
|
||||||
"expires_at (ISO 8601)",
|
"expires_at (ISO 8601)",
|
||||||
],
|
],
|
||||||
@@ -613,7 +613,7 @@ Content-Type: application/json
|
|||||||
{
|
{
|
||||||
"amount_fiat": "100.00",
|
"amount_fiat": "100.00",
|
||||||
"currency": "USD",
|
"currency": "USD",
|
||||||
"confirmation_target": 10,
|
"confirmation_target": 2,
|
||||||
"metadata": { "order_id": "ORDER-1234" }
|
"metadata": { "order_id": "ORDER-1234" }
|
||||||
}`}</code>
|
}`}</code>
|
||||||
</pre>
|
</pre>
|
||||||
|
|||||||
Reference in New Issue
Block a user