mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
AMM (#310)
* AMM * LINT + Fixes * Remove unused global variables. * BLACK * BLACK * AMM - Various Fixes/Features/Bug Fixes. * FLAKE * FLAKE * BLACK * Small fix * Fix * Auto-start option AMM + Various fixes/bugs/styling. * Updated createoffers.py * BLACK * AMM Styling * Update bid_xmr template confirm model. * Fixed bug with Create Default Configuration + Added confirm modal. * Fix: Better redirect. * Fixed adjust_rates_based_on_market + Removed debug / extra logging + Various fixes. * GUI v3.2.2 * Fix sub-header your-offers count when created offers by AMM. * Fix math. * Added USD prices + Add offers/bids checkbox enabled always checked. * Donation page. * Updated header.html + Typo. * Update on createoffer.py + BLACK * AMM: html updates. * AMM: Add all, minrate, and static options. * AMM: Amount step default 0.001 * Fix global settings. * Update createoffers.py * Fixed bug with autostart when save global settings + Various layout fixes. * Fixed bug with autostart with add/edit + Added new option Orderbook (Auto-Accept) * Fixed debug + New feature attempt bids first. * Fix: Orderbook (Auto-Accept) * Added bidding strategy: Only bid on auto-accept offers (best rates from auto-accept only) * Fix: with_extra_info * Small fix automation_strat_id * Various fixes. * Final fixes
This commit is contained in:
@@ -48,6 +48,20 @@ def signal_handler(sig, frame):
|
||||
sys.stdout.fileno(), f"Signal {sig} detected, ending program.\n".encode("utf-8")
|
||||
)
|
||||
if swap_client is not None and not swap_client.chainstate_delay_event.is_set():
|
||||
try:
|
||||
from basicswap.ui.page_amm import stop_amm_process, get_amm_status
|
||||
|
||||
amm_status = get_amm_status()
|
||||
if amm_status == "running":
|
||||
logger.info("Signal handler stopping AMM process...")
|
||||
success, msg = stop_amm_process(swap_client)
|
||||
if success:
|
||||
logger.info(f"AMM signal shutdown: {msg}")
|
||||
else:
|
||||
logger.warning(f"AMM signal shutdown warning: {msg}")
|
||||
except Exception as e:
|
||||
logger.error(f"Error stopping AMM in signal handler: {e}")
|
||||
|
||||
swap_client.stopRunning()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user