Tie the withdrawal minimum to the bet amount instead of a separate field
RoundConfig.min_amount_sats was an independently-configurable floor that could drift out of sync with bet_amount_sats for no real reason (deposits never had a server-side minimum anyway). Drop the field and enforce amount_sats >= config.bet_amount_sats directly in request_withdrawal. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+1
-2
@@ -75,7 +75,7 @@ class RoundConfig(Base):
|
||||
"""Single-row operational config, DB-backed so it's editable without a redeploy.
|
||||
|
||||
Everything business/round-related lives here (round timing, bet amount, fee
|
||||
rate, RBF timeout, minimum amount) so an operator can tune it live. Secrets
|
||||
rate, RBF timeout) so an operator can tune it live. Secrets
|
||||
and infra wiring (master key, JWT secret, Electrum host, admin token,
|
||||
database URL) deliberately stay env-var-driven — those require a restart
|
||||
anyway and aren't safe to hot-swap."""
|
||||
@@ -92,7 +92,6 @@ class RoundConfig(Base):
|
||||
# NOT gate the actual draw, which still waits for a real confirmed block for
|
||||
# its entropy (rounds/scheduler.py) — that can take longer than this value.
|
||||
draw_animation_seconds: Mapped[int] = mapped_column(default=20)
|
||||
min_amount_sats: Mapped[int] = mapped_column(BigInteger, default=100_000_000)
|
||||
fee_rate_sat_vb: Mapped[int] = mapped_column(default=1)
|
||||
rbf_timeout_seconds: Mapped[int] = mapped_column(default=900)
|
||||
# Maintenance switch: when true, the round currently in progress still runs to
|
||||
|
||||
Reference in New Issue
Block a user