mmgen-txsend: shorten default confirmation to 'YES'

This commit is contained in:
The MMGen Project 2026-01-16 15:41:44 +00:00
commit 86d51f1ad7
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 4 additions and 3 deletions

View file

@ -47,7 +47,7 @@ class OnlineSigned(Signed):
action = 'broadcast this transaction to the {} {} network'.format(
self.proto.coin,
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')
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')

View file

@ -359,5 +359,6 @@ class CmdTestShared:
def _do_confirm_send(self, t, quiet=False, confirm_send=True, sure=True):
if sure:
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'))