Browse Source

txcreate, txdo, txbump: minor help screen formatting fixes

The MMGen Project 7 months ago
parent
commit
a0094a2eb9
5 changed files with 15 additions and 17 deletions
  1. 2 2
      mmgen/help/help_notes.py
  2. 11 9
      mmgen/help/txcreate.py
  3. 1 3
      mmgen/main_txbump.py
  4. 1 1
      mmgen/main_txcreate.py
  5. 0 2
      mmgen/main_txdo.py

+ 2 - 2
mmgen/help/help_notes.py

@@ -166,9 +166,9 @@ as {r}, using an integer followed by {l}, for{s}{u}""".format(
 					r = BaseTX(cfg=self.cfg, proto=eth_proto).rel_fee_desc,
 					r = BaseTX(cfg=self.cfg, proto=eth_proto).rel_fee_desc,
 					l = self.fee_spec_letters(use_quotes=True, proto=eth_proto),
 					l = self.fee_spec_letters(use_quotes=True, proto=eth_proto),
 					u = self.fee_spec_names(proto=eth_proto, linebreak='\n'))
 					u = self.fee_spec_names(proto=eth_proto, linebreak='\n'))
-				+ ' (for Ethereum)')
+				+ ' (for Ethereum)\n\n')
 		else:
 		else:
-			return text + '.'
+			return text + '.\n\n'
 
 
 	def passwd(self):
 	def passwd(self):
 		return """
 		return """

+ 11 - 9
mmgen/help/txcreate.py

@@ -41,14 +41,7 @@ cases, the resulting byte string must not exceed {bl} bytes in length.
 The transaction output is specified in the form ADDRESS,AMOUNT.
 The transaction output is specified in the form ADDRESS,AMOUNT.
 """)
 """)
 
 
-	return f"""
-The transaction’s outputs are listed on the command line, while its inputs
-are chosen from a list of the wallet’s unspent outputs via an interactive
-menu.  Alternatively, inputs may be specified using the --inputs option.
-
-Addresses on the command line can be either native coin addresses or MMGen
-IDs in the form SEED_ID:ADDRTYPE_CODE:INDEX.
-{outputs_info}
+	fee_info = """
 If the transaction fee is not specified on the command line (see FEE
 If the transaction fee is not specified on the command line (see FEE
 SPECIFICATION below), it will be calculated dynamically using network fee
 SPECIFICATION below), it will be calculated dynamically using network fee
 estimation for the default (or user-specified) number of confirmations.
 estimation for the default (or user-specified) number of confirmations.
@@ -56,4 +49,13 @@ If network fee estimation fails, the user will be prompted for a fee.
 
 
 Network-estimated fees will be multiplied by the value of --fee-adjust, if
 Network-estimated fees will be multiplied by the value of --fee-adjust, if
 specified.
 specified.
-"""
+""" if proto.has_usr_fee else ''
+
+	return f"""
+The transaction’s outputs are listed on the command line, while its inputs
+are chosen from a list of the wallet’s unspent outputs via an interactive
+menu.  Alternatively, inputs may be specified using the --inputs option.
+
+Addresses on the command line can be either native coin addresses or MMGen
+IDs in the form SEED_ID:ADDRTYPE_CODE:INDEX.
+{outputs_info}{fee_info}"""

+ 1 - 3
mmgen/main_txbump.py

@@ -109,9 +109,7 @@ Internet must be reachable either directly or via the SOCKS5 proxy specified
 with the --proxy option.  To improve privacy, it’s recommended to proxy
 with the --proxy option.  To improve privacy, it’s recommended to proxy
 requests to the quote server via Tor or some other anonymity network.
 requests to the quote server via Tor or some other anonymity network.
 
 
-{g}{F}
-
-{s}
+{g}{F}{s}
 Seed source files must have the canonical extensions listed in the 'FileExt'
 Seed source files must have the canonical extensions listed in the 'FileExt'
 column below:
 column below:
 
 

+ 1 - 1
mmgen/main_txcreate.py

@@ -90,7 +90,7 @@ opts_data = {
 			-- -y, --yes             Answer 'yes' to prompts, suppress non-essential output
 			-- -y, --yes             Answer 'yes' to prompts, suppress non-essential output
 			e- -X, --cached-balances Use cached balances
 			e- -X, --cached-balances Use cached balances
 		""",
 		""",
-		'notes': '\n{c}\n{n_at}\n\n{g}{F}\n\n{x}',
+		'notes': '\n{c}\n{n_at}\n\n{g}{F}{x}',
 	},
 	},
 	'code': {
 	'code': {
 		'usage': lambda cfg, proto, help_notes, s: s.format(
 		'usage': lambda cfg, proto, help_notes, s: s.format(

+ 0 - 2
mmgen/main_txdo.py

@@ -122,8 +122,6 @@ opts_data = {
 {n_at}
 {n_at}
 
 
 {g}{F}
 {g}{F}
-
-
                                  SIGNING NOTES
                                  SIGNING NOTES
 {s}
 {s}
 Seed source files must have the canonical extensions listed in the 'FileExt'
 Seed source files must have the canonical extensions listed in the 'FileExt'