diff --git a/releases/Next-ChangeLog.md b/releases/Next-ChangeLog.md index 9815919b..0cf4eb61 100644 --- a/releases/Next-ChangeLog.md +++ b/releases/Next-ChangeLog.md @@ -19,6 +19,7 @@ This lists the new changes that have not yet been published in a normal release. - Bugfix: Clear any pending keystrokes before PSBT approval screen. - Bugfix: UX shows only 10 outputs with the biggest value on screen, other values available after a keypress. +- Bugfix: Calculate progress bar correctly in Address Explorer # Mk4 Specific Changes diff --git a/shared/address_explorer.py b/shared/address_explorer.py index 3b200c96..96fa1240 100644 --- a/shared/address_explorer.py +++ b/shared/address_explorer.py @@ -298,16 +298,16 @@ Press (3) if you really understand and accept these risks. # - makes a redeem script # - converts into addr # - assumes 0/0 is first address. - for (i, addr, paths, script) in ms_wallet.yield_addresses(start, n, change_idx=change): + for idx, addr, paths, script in ms_wallet.yield_addresses(start, n, change): addrs.append(censor_address(addr)) - if i == 0 and ms_wallet.N <= 4: + if idx == 0 and ms_wallet.N <= 4: msg += '\n'.join(paths) + '\n =>\n' else: - msg += '⋯/%d/%d =>\n' % (change, i) + msg += '⋯/%d/%d =>\n' % (change, idx) msg += truncate_address(addr) + '\n\n' - dis.progress_sofar(i, n) + dis.progress_sofar(idx-start+1, n) else: # single-signer wallets @@ -317,11 +317,10 @@ Press (3) if you really understand and accept these risks. from ownership import OWNERSHIP OWNERSHIP.note_wallet_used(addr_fmt, self.account_num) - for (idx, addr, deriv) in main.yield_addresses(start, n, - change_idx=(change if allow_change else None)): + for idx, addr, deriv in main.yield_addresses(start, n, change if allow_change else None): addrs.append(addr) msg += "%s =>\n%s\n\n" % (deriv, addr) - dis.progress_sofar(idx, n or 1) + dis.progress_sofar(idx-start+1, n) # export options k0 = 'to show change addresses' if allow_change and change == 0 else None diff --git a/shared/auth.py b/shared/auth.py index 1f43f56d..bfad0034 100644 --- a/shared/auth.py +++ b/shared/auth.py @@ -870,6 +870,7 @@ class ApproveTransaction(UserAuthorizedAction): item += self.render_output(out) item += "\n" rv += item + dis.progress_sofar(idx-start+1, n) if self.psbt.num_outputs > n: rv += "Press RIGHT to see next group, LEFT to go back. X to quit."