From 1ec1764012db7d0b0e1b86b65e527f73eae7f09c Mon Sep 17 00:00:00 2001 From: tecnovert Date: Wed, 31 Jan 2024 21:16:42 +0200 Subject: [PATCH] ui: Don't list LTC MWEB yet on offers page. --- basicswap/ui/page_offers.py | 2 +- basicswap/ui/util.py | 4 +--- tests/basicswap/extended/test_xmr_persistent.py | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/basicswap/ui/page_offers.py b/basicswap/ui/page_offers.py index d8fc217..63d0fad 100644 --- a/basicswap/ui/page_offers.py +++ b/basicswap/ui/page_offers.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2022-2023 tecnovert +# Copyright (c) 2022-2024 tecnovert # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. diff --git a/basicswap/ui/util.py b/basicswap/ui/util.py index 763f748..a177afa 100644 --- a/basicswap/ui/util.py +++ b/basicswap/ui/util.py @@ -453,9 +453,7 @@ def listAvailableCoins(swap_client, with_variants=True, split_from=False): coins_from.append(coins[-1]) if with_variants and k == Coins.LTC: for v in (Coins.LTC_MWEB, ): - coins.append((int(v), getCoinName(v))) - if split_from and v not in invalid_coins_from: - coins_from.append(coins[-1]) + pass # Add when swappable if split_from: return coins_from, coins return coins diff --git a/tests/basicswap/extended/test_xmr_persistent.py b/tests/basicswap/extended/test_xmr_persistent.py index d1e2a0e..9adb951 100644 --- a/tests/basicswap/extended/test_xmr_persistent.py +++ b/tests/basicswap/extended/test_xmr_persistent.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright (c) 2021-2022 tecnovert +# Copyright (c) 2021-2024 tecnovert # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. @@ -60,7 +60,7 @@ UI_PORT = 12700 + PORT_OFS PARTICL_RPC_PORT_BASE = int(os.getenv('PARTICL_RPC_PORT_BASE', BASE_RPC_PORT)) BITCOIN_RPC_PORT_BASE = int(os.getenv('BITCOIN_RPC_PORT_BASE', BTC_BASE_RPC_PORT)) XMR_BASE_RPC_PORT = int(os.getenv('XMR_BASE_RPC_PORT', XMR_BASE_RPC_PORT)) - +TEST_COINS_LIST = os.getenv('TEST_COINS_LIST', 'bitcoin,monero') NUM_NODES = int(os.getenv('NUM_NODES', 3)) EXTRA_CONFIG_JSON = json.loads(os.getenv('EXTRA_CONFIG_JSON', '{}')) @@ -129,7 +129,7 @@ class Test(unittest.TestCase): logging.info(f'Continuing with existing directory: {test_path}') else: logging.info('Preparing %d nodes.', NUM_NODES) - prepare_nodes(NUM_NODES, 'bitcoin,monero', True, {'min_sequence_lock_seconds': 60}, PORT_OFS) + prepare_nodes(NUM_NODES, TEST_COINS_LIST, True, {'min_sequence_lock_seconds': 60}, PORT_OFS) signal.signal(signal.SIGINT, lambda signal, frame: cls.signal_handler(cls, signal, frame))