feat: reject secret-hash offers where coin pair can use adaptor sig

This commit is contained in:
tecnovert
2026-06-09 10:49:20 +02:00
parent d23665d585
commit 3aacc57f09
5 changed files with 91 additions and 33 deletions
+10
View File
@@ -3611,6 +3611,16 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
raise ValueError(
f"Invalid swap type for: {coin_from.name} -> {coin_to.name}"
)
strict_swap_type: bool = self.settings.get(
"strict_swap_type", False if self.chain == "regtest" else True
)
if strict_swap_type and (
coin_from not in self.coins_without_segwit
or coin_to not in self.coins_without_segwit
):
raise ValueError(
f"Coin pair should use adaptor sig swap type: {coin_from.name} -> {coin_to.name}"
)
def _process_notification_safe(self, event_type, event_data) -> None:
try: