Browse Source

mmgen-txsend: shorten default confirmation to 'YES'

The MMGen Project 4 days ago
parent
commit
86d51f1ad7
2 changed files with 4 additions and 3 deletions
  1. 1 1
      mmgen/tx/online.py
  2. 3 2
      test/cmdtest_d/shared.py

+ 1 - 1
mmgen/tx/online.py

@@ -47,7 +47,7 @@ class OnlineSigned(Signed):
 			action = 'broadcast this transaction to the {} {} network'.format(
 			action = 'broadcast this transaction to the {} {} network'.format(
 				self.proto.coin,
 				self.proto.coin,
 				self.proto.network.upper()),
 				self.proto.network.upper()),
-			expect  = 'YES' if self.cfg.quiet or self.cfg.yes else 'YES, I REALLY WANT TO DO THIS')
+			expect = 'YES')
 		msg('Sending transaction')
 		msg('Sending transaction')
 		if len(idxs) > 1 and getattr(self, 'coin_txid2', None) and self.is_swap:
 		if len(idxs) > 1 and getattr(self, 'coin_txid2', None) and self.is_swap:
 			ymsg('Warning: two transactions (approval and router) will be broadcast to the network')
 			ymsg('Warning: two transactions (approval and router) will be broadcast to the network')

+ 3 - 2
test/cmdtest_d/shared.py

@@ -359,5 +359,6 @@ class CmdTestShared:
 	def _do_confirm_send(self, t, quiet=False, confirm_send=True, sure=True):
 	def _do_confirm_send(self, t, quiet=False, confirm_send=True, sure=True):
 		if sure:
 		if sure:
 			t.expect('Are you sure you want to broadcast this')
 			t.expect('Are you sure you want to broadcast this')
-		m = ('YES, I REALLY WANT TO DO THIS', 'YES')[quiet]
-		t.expect(f'{m!r} to confirm: ', ('', m)[confirm_send]+'\n')
+		t.expect(
+			"'YES' to confirm: ",
+			('YES\n' if confirm_send else '\n'))