mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
Better error message when trying to swap Firo <> XMR.
This commit is contained in:
@@ -1239,7 +1239,10 @@ class BasicSwap(BaseApp):
|
||||
if swap_type == SwapTypes.XMR_SWAP:
|
||||
reverse_bid: bool = self.is_reverse_ads_bid(coin_from)
|
||||
itx_coin = coin_to if reverse_bid else coin_from
|
||||
if (itx_coin in self.coins_without_segwit + self.scriptless_coins):
|
||||
ptx_coin = coin_from if reverse_bid else coin_to
|
||||
if itx_coin in self.coins_without_segwit + self.scriptless_coins:
|
||||
if ptx_coin in self.coins_without_segwit + self.scriptless_coins:
|
||||
raise ValueError('{} -> {} is not currently supported'.format(coin_from.name, coin_to.name))
|
||||
raise ValueError('Invalid swap type for: {} -> {}'.format(coin_from.name, coin_to.name))
|
||||
else:
|
||||
if coin_from in self.adaptor_swap_only_coins or coin_to in self.adaptor_swap_only_coins:
|
||||
|
||||
@@ -173,7 +173,7 @@ def parseOfferFormData(swap_client, form_data, page_data, options={}):
|
||||
try:
|
||||
swap_client.validateSwapType(coin_from, coin_to, swap_type)
|
||||
except Exception as e:
|
||||
errors.append(f'Invalid Swap type {e}')
|
||||
errors.append(f'{e}')
|
||||
|
||||
if have_data_entry(form_data, 'step1'):
|
||||
if len(errors) == 0 and have_data_entry(form_data, 'continue'):
|
||||
|
||||
Reference in New Issue
Block a user