Require min 1 confirmation in payment tier config.
Disallow minConfirmations: 0 for BTC and XMR tiers at startup validation, update env examples and deploy docs, and drop tx-detected UI copy and legacy tests.
This commit is contained in:
@@ -61,20 +61,20 @@ Edit `.env.prod`. Mandatory configuration:
|
||||
| `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`. At most one tier may use `minConfirmations: 0` (accept unconfirmed / mempool); that tier cannot be the catch-all.
|
||||
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.
|
||||
|
||||
Monero example (default in `.env.example`):
|
||||
|
||||
```json
|
||||
[
|
||||
{ "upToTotalFiat": "30", "minConfirmations": 0 },
|
||||
{ "upToTotalFiat": "30", "minConfirmations": 1 },
|
||||
{ "upToTotalFiat": "100", "minConfirmations": 3 },
|
||||
{ "upToTotalFiat": "300", "minConfirmations": 5 },
|
||||
{ "minConfirmations": 10 }
|
||||
]
|
||||
```
|
||||
|
||||
Orders up to 30 → 0 confirmations; up to 100 → 3; up to 300 → 5; above 300 → 10. Tiers are shown read-only in CMS shop settings.
|
||||
Orders up to 30 → 1 confirmation; up to 100 → 3; up to 300 → 5; above 300 → 10. Tiers are shown read-only in CMS shop settings.
|
||||
|
||||
## 5. Bootstrap TLS certificates
|
||||
|
||||
|
||||
Reference in New Issue
Block a user