From 49d6b597c270a8669575f373f76c33d568999b97 Mon Sep 17 00:00:00 2001 From: nobswebdev Date: Sun, 13 Sep 2026 12:50:12 +0200 Subject: [PATCH] Lower default Bitcoin confirmation tiers for faster on-chain checkout. Use 1/2/3/6 confirmations by order value instead of 1/3/5/6, since Bitcoin blocks are much slower than Monero. --- .env.example | 2 +- deploy/DEPLOYMENT_GUIDE.md | 54 +++++++++++++++++++------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.env.example b/.env.example index c7035bf..3d78ee4 100644 --- a/.env.example +++ b/.env.example @@ -105,7 +105,7 @@ MONERO_WALLET_NAME=shop MONERO_WALLET_PASSWORD=change-me MONERO_MIN_INCOMING_ATOMIC=10000000 # 0.00001 XMR (~half a USD cent at that moment) -BITCOIN_CONFIRMATION_TIERS='[{"upToTotalFiat":"30","minConfirmations":1},{"upToTotalFiat":"100","minConfirmations":3},{"upToTotalFiat":"300","minConfirmations":5},{"minConfirmations":6}]' +BITCOIN_CONFIRMATION_TIERS='[{"upToTotalFiat":"200","minConfirmations":1},{"upToTotalFiat":"1000","minConfirmations":2},{"upToTotalFiat":"2000","minConfirmations":3},{"minConfirmations":6}]' BITCOIN_MIN_INCOMING_ATOMIC=7 # 0.00000007 BTC (~half a USD cent at that moment) ELECTRUM_VERSION=4.8.1 diff --git a/deploy/DEPLOYMENT_GUIDE.md b/deploy/DEPLOYMENT_GUIDE.md index 91b03db..f9eb239 100644 --- a/deploy/DEPLOYMENT_GUIDE.md +++ b/deploy/DEPLOYMENT_GUIDE.md @@ -33,33 +33,33 @@ chmod 600 .env.prod Edit `.env.prod`. Mandatory configuration: -| Variable | Production value | -| ---------------------------- | ------------------------------------------- | -| `COMPOSE_PROJECT_NAME` | `nullcart_prod` | -| `POSTGRES_PASSWORD` | strong random password | -| `POSTGRES_MIGRATIONS_RUN` | `true` | -| `PGADMIN_DEFAULT_PASSWORD` | strong random password | -| `NODE_ENV` | `production` | -| `CORS_ORIGINS` | `https://your-domain.com` | -| `CLEARNET_DOMAIN` | `your-domain.com` | -| `JWT_SECRET` | strong random secret | -| `CMS_PASSWORD` | strong admin password | -| `SHOP_NAME` | your shop name | -| `SHOP_FIAT_CURRENCY` | `USD`, `EUR`, `GBP`, `CAD`, `AUD`, or `CHF` | -| `SIGNED_COOKIE_JWT_SECRET` | strong random secret | -| `BASE64_ENCRYPTION_KEY` | generate with `openssl rand -base64 32` | -| `PAYMENT_METHODS_ENABLED` | e.g. `xmr,btc` | -| `MONERO_NETWORK` | `mainnet` | -| `MONERO_DAEMON_ADDRESS` | mainnet node `host:port` | -| `MONERO_WALLET_RPC_USERNAME` | strong random username | -| `MONERO_WALLET_RPC_PASSWORD` | strong random password | -| `MONERO_WALLET_PASSWORD` | strong wallet password | -| `ELECTRUM_NETWORK` | `mainnet` | -| `ELECTRUM_SERVER` | Electrum peer as `host:port:s` (SSL) or `host:port:t` (TCP), e.g. `electrum.blockstream.info:50002:s` | -| `ELECTRUM_WALLET_PASSWORD` | strong wallet password | -| `ELECTRUM_DAEMON_RPC_PASSWORD` | strong random password | -| `VITE_API_BASE_URL` | `/api` | -| `VITE_SHOP_FIAT_CURRENCY` | same as `SHOP_FIAT_CURRENCY` | +| Variable | Production value | +| --- | --- | +| `COMPOSE_PROJECT_NAME` | `nullcart_prod` | +| `POSTGRES_PASSWORD` | strong random password | +| `POSTGRES_MIGRATIONS_RUN` | `true` | +| `PGADMIN_DEFAULT_PASSWORD` | strong random password | +| `NODE_ENV` | `production` | +| `CORS_ORIGINS` | `https://your-domain.com` | +| `CLEARNET_DOMAIN` | `your-domain.com` | +| `JWT_SECRET` | strong random secret | +| `CMS_PASSWORD` | strong admin password | +| `SHOP_NAME` | your shop name | +| `SHOP_FIAT_CURRENCY` | `USD`, `EUR`, `GBP`, `CAD`, `AUD`, or `CHF` | +| `SIGNED_COOKIE_JWT_SECRET` | strong random secret | +| `BASE64_ENCRYPTION_KEY` | generate with `openssl rand -base64 32` | +| `PAYMENT_METHODS_ENABLED` | e.g. `xmr,btc` | +| `MONERO_NETWORK` | `mainnet` | +| `MONERO_DAEMON_ADDRESS` | mainnet node `host:port` | +| `MONERO_WALLET_RPC_USERNAME` | strong random username | +| `MONERO_WALLET_RPC_PASSWORD` | strong random password | +| `MONERO_WALLET_PASSWORD` | strong wallet password | +| `ELECTRUM_NETWORK` | `mainnet` | +| `ELECTRUM_SERVER` | Electrum peer as `host:port:s` (SSL) or `host:port:t` (TCP), e.g. `electrum.blockstream.info:50002:s` | +| `ELECTRUM_WALLET_PASSWORD` | strong wallet password | +| `ELECTRUM_DAEMON_RPC_PASSWORD` | strong random password | +| `VITE_API_BASE_URL` | `/api` | +| `VITE_SHOP_FIAT_CURRENCY` | same as `SHOP_FIAT_CURRENCY` | Optional — adjust per-method payment confirmation rules (`MONERO_CONFIRMATION_TIERS`, `BITCOIN_CONFIRMATION_TIERS`). Each is a JSON array with the same shape. For each order, the shop uses `minConfirmations` from the first tier where the order total (in `SHOP_FIAT_CURRENCY`) is `<= upToTotalFiat`. The last tier is a catch-all and must omit `upToTotalFiat`. Every tier must use `minConfirmations` >= 1.