From 58fc466e132929f1ba8aa6dbe5054f65a415e8c7 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Mon, 2 Feb 2026 09:56:53 +0000 Subject: [PATCH] proto.xmr.tw.view: remove `self.dump_data` attribute --- mmgen/proto/xmr/tw/view.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mmgen/proto/xmr/tw/view.py b/mmgen/proto/xmr/tw/view.py index 9c6d56d0..6f59433f 100755 --- a/mmgen/proto/xmr/tw/view.py +++ b/mmgen/proto/xmr/tw/view.py @@ -57,16 +57,16 @@ class MoneroTwView: op = xmrwallet_op('dump_data', self.cfg, None, None, compat_call=True) await op.restart_wallet_daemon() - self.dump_data = await op.main() + dump_data = await op.main() - if self.dump_data: - self.sid = SeedID(sid=self.dump_data[0]['seed_id']) + if dump_data: + self.sid = SeedID(sid=dump_data[0]['seed_id']) self.total = self.unlocked_total = self.proto.coin_amt('0') def gen_addrs(): bd = namedtuple('address_balance_data', ['bal', 'unlocked_bal', 'blocks_to_unlock']) - for wdata in self.dump_data: + for wdata in dump_data: bals_data = {i: {} for i in range(len(wdata['data'].accts_data['subaddress_accounts']))} for d in wdata['data'].bals_data.get('per_subaddress', []): @@ -235,12 +235,14 @@ class MoneroTwView: from ....obj import Int from ....util import msg, suf from ....ui import item_chooser + wdata = {} + for d in self.accts_data: + wdata[d.idx] = (wdata[d.idx] + 1) if d.idx in wdata else 1 msg('\n') return item_chooser( self.cfg, prompt, - [(d['wallet_num'], len(d['data'].accts_data['subaddress_accounts'])) - for d in self.dump_data], + tuple(wdata.items()), lambda d: '{a} [{b} account{c}]'.format( a = self.make_wallet_id(d[0]).hl(), b = Int(d[1]).hl(),