remove excessive newlines from locktime msg
This commit is contained in:
parent
d924f7b4ed
commit
d7846eb049
@ -694,7 +694,7 @@ class ApproveTransaction(UserAuthorizedAction):
|
||||
|
||||
fee = self.psbt.calculate_fee()
|
||||
if fee is not None:
|
||||
msg.write("\nNetwork fee:\n%s %s\n" % self.chain.render_value(fee))
|
||||
msg.write("Network fee:\n%s %s\n\n" % self.chain.render_value(fee))
|
||||
|
||||
# NEW: show where all the change outputs are going
|
||||
self.output_change_text(msg)
|
||||
@ -702,13 +702,14 @@ class ApproveTransaction(UserAuthorizedAction):
|
||||
|
||||
if self.psbt.ux_notes:
|
||||
# currently we only have locktimes in ux_notes
|
||||
msg.write('\nTX LOCKTIMES\n\n')
|
||||
msg.write('TX LOCKTIMES\n\n')
|
||||
|
||||
for label, m in self.psbt.ux_notes:
|
||||
msg.write('- %s: %s\n\n' % (label, m))
|
||||
msg.write('- %s: %s\n' % (label, m))
|
||||
msg.write("\n")
|
||||
|
||||
if self.psbt.warnings:
|
||||
msg.write('\n---WARNING---\n\n')
|
||||
msg.write('---WARNING---\n\n')
|
||||
|
||||
for label, m in self.psbt.warnings:
|
||||
msg.write('- %s: %s\n\n' % (label, m))
|
||||
@ -723,7 +724,7 @@ class ApproveTransaction(UserAuthorizedAction):
|
||||
|
||||
dis.progress_bar_show(1) # finish the Validating...
|
||||
if not hsm_active:
|
||||
msg.write("\nPress OK to approve and sign transaction. X to abort.")
|
||||
msg.write("Press OK to approve and sign transaction. X to abort.")
|
||||
ch = await ux_show_story(msg, title="OK TO SEND?")
|
||||
else:
|
||||
ch = await hsm_active.approve_transaction(self.psbt, self.psbt_sha, msg.getvalue())
|
||||
@ -866,7 +867,7 @@ class ApproveTransaction(UserAuthorizedAction):
|
||||
|
||||
total_val = ' '.join(self.chain.render_value(total))
|
||||
|
||||
msg.write("\nChange back:\n%s\n" % total_val)
|
||||
msg.write("Change back:\n%s\n" % total_val)
|
||||
|
||||
if len(addrs) == 1:
|
||||
msg.write(' - to address -\n%s\n' % addrs[0])
|
||||
@ -875,6 +876,8 @@ class ApproveTransaction(UserAuthorizedAction):
|
||||
for a in addrs:
|
||||
msg.write('%s\n' % a)
|
||||
|
||||
msg.write("\n")
|
||||
|
||||
def output_summary_text(self, msg):
|
||||
# Produce text report of where their cash is going. This is what
|
||||
# they use to decide if correct transaction is being signed.
|
||||
@ -885,7 +888,7 @@ class ApproveTransaction(UserAuthorizedAction):
|
||||
# consolidating txn that doesn't change balance of account.
|
||||
msg.write("Consolidating\n%s %s\nwithin wallet.\n\n" %
|
||||
self.chain.render_value(self.psbt.total_value_out))
|
||||
msg.write("%d ins - fee\n = %d outs\n" % (
|
||||
msg.write("%d ins - fee\n = %d outs\n\n" % (
|
||||
self.psbt.num_inputs, self.psbt.num_outputs))
|
||||
|
||||
return
|
||||
@ -905,6 +908,7 @@ class ApproveTransaction(UserAuthorizedAction):
|
||||
|
||||
msg.write(self.render_output(tx_out))
|
||||
|
||||
msg.write("\n")
|
||||
return
|
||||
|
||||
# Too many to show them all, so
|
||||
@ -946,6 +950,8 @@ class ApproveTransaction(UserAuthorizedAction):
|
||||
|
||||
msg.write('%s %s\n' % self.chain.render_value(mtot))
|
||||
|
||||
msg.write("\n")
|
||||
|
||||
|
||||
def sign_transaction(psbt_len, flags=0x0, psbt_sha=None):
|
||||
# transaction (binary) loaded into PSRAM already, checksum checked
|
||||
|
||||
@ -1309,7 +1309,6 @@ class psbtObject(psbtProxy):
|
||||
msg += "\n\n"
|
||||
for idx, num_blocks in bb:
|
||||
msg += " %d. %d blocks\n" % (idx, num_blocks)
|
||||
msg += "\n"
|
||||
|
||||
self.ux_notes.append(("Block height RTL", msg))
|
||||
|
||||
@ -1333,7 +1332,6 @@ class psbtObject(psbtProxy):
|
||||
for idx, seconds in tb:
|
||||
hr = seconds2human_readable(seconds)
|
||||
msg += " %d. %s\n" % (idx, hr)
|
||||
msg += "\n"
|
||||
|
||||
self.ux_notes.append(("Time-based RTL", msg))
|
||||
|
||||
@ -1430,6 +1428,7 @@ class psbtObject(psbtProxy):
|
||||
msg += "%d (unix timestamp)" % self.lock_time
|
||||
|
||||
msg += " (MTP)" # median time past
|
||||
msg += "\n"
|
||||
self.ux_notes.append(("Abs Locktime", msg))
|
||||
|
||||
# create UX for users about tx level relative timelocks (nSequence)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user