refactor: make adaptor-sig the default swap type

This commit is contained in:
tecnovert
2026-06-04 00:16:10 +02:00
parent 34b6f816ee
commit 46e3d0266b
2 changed files with 10 additions and 9 deletions
+6 -6
View File
@@ -185,14 +185,14 @@ def parseOfferFormData(swap_client, form_data, page_data, options={}):
parsed_data["swap_type"] = page_data["swap_type"] parsed_data["swap_type"] = page_data["swap_type"]
swap_type = swap_type_from_string(parsed_data["swap_type"]) swap_type = swap_type_from_string(parsed_data["swap_type"])
elif ( elif (
parsed_data["coin_from"] in swap_client.adaptor_swap_only_coins parsed_data["coin_from"] in swap_client.coins_without_segwit
or parsed_data["coin_to"] in swap_client.adaptor_swap_only_coins and parsed_data["coin_to"] in swap_client.coins_without_segwit
): ):
parsed_data["swap_type"] = strSwapType(SwapTypes.XMR_SWAP)
swap_type = SwapTypes.XMR_SWAP
else:
parsed_data["swap_type"] = strSwapType(SwapTypes.SELLER_FIRST) parsed_data["swap_type"] = strSwapType(SwapTypes.SELLER_FIRST)
swap_type = SwapTypes.SELLER_FIRST swap_type = SwapTypes.SELLER_FIRST
else:
parsed_data["swap_type"] = strSwapType(SwapTypes.XMR_SWAP)
swap_type = SwapTypes.XMR_SWAP
if swap_type == SwapTypes.XMR_SWAP: if swap_type == SwapTypes.XMR_SWAP:
page_data["swap_style"] = "xmr" page_data["swap_style"] = "xmr"
@@ -500,7 +500,7 @@ def page_newoffer(self, url_split, post_string):
"debug_ui": swap_client.debug_ui, "debug_ui": swap_client.debug_ui,
"automation_strat_id": -1, "automation_strat_id": -1,
"amt_bid_min": format_amount(1, 3), "amt_bid_min": format_amount(1, 3),
"swap_type": strSwapType(SwapTypes.SELLER_FIRST), "swap_type": strSwapType(SwapTypes.XMR_SWAP),
} }
post_data = parse.parse_qs(post_string) post_data = parse.parse_qs(post_string)
+4 -3
View File
@@ -7,18 +7,19 @@
- Prevent sending offers where the chain feerates are out of range. - Prevent sending offers where the chain feerates are out of range.
- Valid feerate range is the node's estimated feerate for confirmation in 24 blocks to 4x the estimated feerate. - Valid feerate range is the node's estimated feerate for confirmation in 24 blocks to 4x the estimated feerate.
- The minimum feerate confirmation can be adjusted with the "low_fee_conf_target" setting. - The minimum feerate confirmation can be adjusted with the "low_fee_conf_target" setting.
- If "low_feerate" is set above 0 it is used instead of the dynamic feerate with "low_fee_conf_target" - If "low_feerate" is set above 0 it is used instead of the dynamic feerate with "low_fee_conf_target".
- The maximum feerate multiplier can be adjusted with the "high_estimated_feerate_multiplier" setting. - The maximum feerate multiplier can be adjusted with the "high_estimated_feerate_multiplier" setting.
- If "high_estimated_feerate_multiplier" is set below 1.0 the max feerate can be set with the "high_feerate" setting. - If "high_estimated_feerate_multiplier" is set below 1.0 the max feerate can be set with the "high_feerate" setting.
- New setting "startup_delay" - New setting "startup_delay":
- Adjusts the time waited for coin daemons to start between "startup_tries". - Adjusts the time waited for coin daemons to start between "startup_tries".
- Valid as a base setting and can be overridden per coin with chainclients settings. - Valid as a base setting and can be overridden per coin with chainclients settings.
- Add subfee bids. - Add subfee bids.
- Enables a user to create a bid specifying the amount before the lock tx fee. - Enables a user to create a bid specifying the amount before the lock tx fee.
- Currently only works when the coin to is not XMR like. - Currently only works when the coin to is not XMR like.
- Set Adaptor sig bid type as default where possible.
- UI: - UI:
- offer page: - offer page:
- Fixed feerate from other chain displayed for reversed swaps - Fixed feerate from other chain displayed for reversed swaps.
- Added warning text for fee above 1.2 x local estimate. - Added warning text for fee above 1.2 x local estimate.
- Added subfee bid option. - Added subfee bid option.