mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-08-17 01:08:05 +00:00
fix(core): remove silent failures
This commit is contained in:
@@ -132,8 +132,9 @@ def validate_config(config: dict) -> None:
|
|||||||
value = get_nested_value(config, path)
|
value = get_nested_value(config, path)
|
||||||
if value not in valid_values:
|
if value not in valid_values:
|
||||||
raise ValueError(f"{path} must be one of {valid_values}")
|
raise ValueError(f"{path} must be one of {valid_values}")
|
||||||
except ValueError:
|
except ValueError as e:
|
||||||
continue
|
if "Missing required config key" not in str(e):
|
||||||
|
raise
|
||||||
|
|
||||||
# Cannot enable both dynamic and fixed priority fees
|
# Cannot enable both dynamic and fixed priority fees
|
||||||
try:
|
try:
|
||||||
@@ -141,8 +142,9 @@ def validate_config(config: dict) -> None:
|
|||||||
fixed = get_nested_value(config, "priority_fees.enable_fixed")
|
fixed = get_nested_value(config, "priority_fees.enable_fixed")
|
||||||
if dynamic and fixed:
|
if dynamic and fixed:
|
||||||
raise ValueError("Cannot enable both dynamic and fixed priority fees simultaneously")
|
raise ValueError("Cannot enable both dynamic and fixed priority fees simultaneously")
|
||||||
except ValueError:
|
except ValueError as e:
|
||||||
pass
|
if "Missing required config key" not in str(e):
|
||||||
|
raise
|
||||||
|
|
||||||
# Platform-specific validation
|
# Platform-specific validation
|
||||||
platform_str = config.get("platform", "pump_fun")
|
platform_str = config.get("platform", "pump_fun")
|
||||||
@@ -176,8 +178,9 @@ def validate_platform_config(config: dict, platform: Platform) -> None:
|
|||||||
f"Listener type '{listener_type}' is not compatible with platform '{platform.value}'. "
|
f"Listener type '{listener_type}' is not compatible with platform '{platform.value}'. "
|
||||||
f"Compatible listeners: {compatible_listeners}"
|
f"Compatible listeners: {compatible_listeners}"
|
||||||
)
|
)
|
||||||
except ValueError:
|
except ValueError as e:
|
||||||
pass
|
if "Missing required config key" not in str(e):
|
||||||
|
raise
|
||||||
|
|
||||||
# Platform-specific configuration validation
|
# Platform-specific configuration validation
|
||||||
if platform == Platform.PUMP_FUN:
|
if platform == Platform.PUMP_FUN:
|
||||||
|
|||||||
Reference in New Issue
Block a user