Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,21 @@ class BackendWalletConfig:
"""Configuration for backend wallet operations."""

seed_phrase: str = os.getenv("AIBTC_BACKEND_WALLET_SEED_PHRASE", "")
min_balance_threshold: str = os.getenv(
"AIBTC_BACKEND_WALLET_MIN_BALANCE_THRESHOLD", "1"
) # 1 STX in STX
funding_amount: str = os.getenv(
"AIBTC_BACKEND_WALLET_FUNDING_AMOUNT", "1"
) # 1 STX in STX


@dataclass
class STXTransferWalletConfig:
"""Configuration for STX transfer operations with dedicated wallet."""

seed_phrase: str = os.getenv("AIBTC_STX_TRANSFER_WALLET_SEED_PHRASE", "")
# TODO: update env var names to match config
min_balance_threshold: str = os.getenv(
"AIBTC_BACKEND_WALLET_MIN_BALANCE_THRESHOLD", "5"
) # 5 STX in STX
# TODO: update env var names to match config
funding_amount: str = os.getenv(
"AIBTC_BACKEND_WALLET_FUNDING_AMOUNT", "10"
) # 10 STX in STX


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def __init__(self, runner_config: Optional[RunnerConfig] = None):
# Configurable funding thresholds using global config
self.min_balance_threshold = int(
config.backend_wallet.min_balance_threshold
) # 1 STX in STX default
) # 5 STX in STX default
self.funding_amount = int(
config.backend_wallet.funding_amount
) # 5 STX in STX default
) # 10 STX in STX default

async def _validate_config(self, context: JobContext) -> bool:
"""Validate task configuration."""
Expand Down
Loading