From c515ec03a5eca06c315e4b8fb42147efa61b6956 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 30 Mar 2025 10:20:22 +0000 Subject: [PATCH] tx.new_swap: remove ETH fee warning --- mmgen/tx/new_swap.py | 19 +------------------ test/cmdtest_d/ethswap.py | 12 +++++------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/mmgen/tx/new_swap.py b/mmgen/tx/new_swap.py index df42100b..e10e6d18 100755 --- a/mmgen/tx/new_swap.py +++ b/mmgen/tx/new_swap.py @@ -28,29 +28,12 @@ def init_proto_from_coin(cfg, sp, coin, desc): from ..protocol import init_proto return init_proto(cfg, coin, network=cfg._proto.network, need_amt=True) -def do_eth_fee_warning(cfg): - from ..ui import keypress_confirm - from ..color import yellow - warning = """ - Warning: Fee bumping for Ethereum swap transactions is not currently supported. - Make sure to include a sufficient transaction fee! Continue? (Y/n): - """ - keypress_confirm( - cfg, - ' ' + yellow(warning.strip()) + ' ', - default_yes = True, - complete_prompt = True, - do_exit = True) - def get_send_proto(cfg): try: arg = cfg._args.pop(0) except: cfg._usage() - proto = init_proto_from_coin(cfg, get_swap_proto_mod(cfg.swap_proto), arg, 'send') - if proto.coin == 'ETH': - do_eth_fee_warning(cfg) - return proto + return init_proto_from_coin(cfg, get_swap_proto_mod(cfg.swap_proto), arg, 'send') class NewSwap(New): desc = 'swap transaction' diff --git a/test/cmdtest_d/ethswap.py b/test/cmdtest_d/ethswap.py index fd24a2b2..79497979 100755 --- a/test/cmdtest_d/ethswap.py +++ b/test/cmdtest_d/ethswap.py @@ -203,17 +203,15 @@ class CmdTestEthSwapEth(CmdTestEthdev, CmdTestSwapMethods): def swaptxcreate1(self): t = self._swaptxcreate(['ETH', '8.765', 'BTC']) - t.expect('Continue? (Y/n):', 'y') t.expect('OK? (Y/n): ', 'y') return self._swaptxcreate_ui_common(t) def swaptxcreate2(self): - self.get_file_with_ext('rawtx', delete_all=True) - t = self._swaptxcreate( - ['ETH', '8.765', 'BTC', f'{dfl_seed_id}:B:4'], - add_opts = ['--trade-limit=3%']) - t.expect('Continue? (Y/n):', 'y') - return self._swaptxcreate_ui_common(t, expect=':2019e4/1/0') + return self._swaptxcreate_ui_common( + self._swaptxcreate( + ['ETH', '8.765', 'BTC', f'{dfl_seed_id}:B:4'], + add_opts = ['--trade-limit=3%']), + expect = ':2019e4/1/0') def swaptxsign1(self): return self._swaptxsign()