Browse Source

tx.new_swap: remove ETH fee warning

The MMGen Project 3 days ago
parent
commit
c515ec03a5
2 changed files with 6 additions and 25 deletions
  1. 1 18
      mmgen/tx/new_swap.py
  2. 5 7
      test/cmdtest_d/ethswap.py

+ 1 - 18
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'

+ 5 - 7
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()