mirror of
https://github.com/basicswap/basicswap.git
synced 2025-02-25 20:40:41 +00:00
Set default swap type to ADS if coin_from or to is scriptless.
This commit is contained in:
parent
e23216df07
commit
3345d56f5b
1 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ def parseOfferFormData(swap_client, form_data, page_data, options={}):
|
||||||
page_data['swap_type'] = get_data_entry(form_data, 'swap_type')
|
page_data['swap_type'] = get_data_entry(form_data, 'swap_type')
|
||||||
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 parsed_data['coin_to'] in (Coins.XMR, Coins.WOW, Coins.PART_ANON):
|
elif parsed_data['coin_from'] in swap_client.scriptless_coins or parsed_data['coin_to'] in swap_client.scriptless_coins:
|
||||||
parsed_data['swap_type'] = strSwapType(SwapTypes.XMR_SWAP)
|
parsed_data['swap_type'] = strSwapType(SwapTypes.XMR_SWAP)
|
||||||
swap_type = SwapTypes.XMR_SWAP
|
swap_type = SwapTypes.XMR_SWAP
|
||||||
else:
|
else:
|
||||||
|
@ -267,7 +267,7 @@ def postNewOfferFromParsed(swap_client, parsed_data):
|
||||||
if 'swap_type' in parsed_data:
|
if 'swap_type' in parsed_data:
|
||||||
str_swap_type = parsed_data['swap_type'].lower()
|
str_swap_type = parsed_data['swap_type'].lower()
|
||||||
swap_type = swap_type_from_string(str_swap_type)
|
swap_type = swap_type_from_string(str_swap_type)
|
||||||
elif parsed_data['coin_to'] in (Coins.XMR, Coins.WOW, Coins.PART_ANON):
|
elif parsed_data['coin_from'] in swap_client.scriptless_coins or parsed_data['coin_to'] in swap_client.scriptless_coins:
|
||||||
swap_type = SwapTypes.XMR_SWAP
|
swap_type = SwapTypes.XMR_SWAP
|
||||||
|
|
||||||
if swap_type == SwapTypes.XMR_SWAP:
|
if swap_type == SwapTypes.XMR_SWAP:
|
||||||
|
|
Loading…
Reference in a new issue