tw.view: display Seed ID if applicable

This commit is contained in:
The MMGen Project 2025-11-27 11:34:10 +00:00
commit 0ae18743c9
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 7 additions and 0 deletions

View file

@ -13,6 +13,7 @@ proto.xmr.tw.view: Monero protocol base class for tracking wallet view classes
"""
from ....xmrwallet import op as xmrwallet_op
from ....seed import SeedID
from ....tw.view import TwView
class MoneroTwView:
@ -28,6 +29,9 @@ class MoneroTwView:
await op.restart_wallet_daemon()
wallets_data = await op.main()
if wallets_data:
self.sid = SeedID(sid=wallets_data[0]['seed_id'])
self.total = self.proto.coin_amt('0')
def gen_addrs():

View file

@ -441,6 +441,9 @@ class TwView(MMGenObject, metaclass=AsyncInit):
Blue(sort_info),
spc * (self.cols - len(f'{self.hdr_lbl} (sort order: {sort_info})')))
if hasattr(self, 'sid'):
yield f'Seed ID: {self.sid.hl()}'
if self.filters:
yield 'Filters: {}{}'.format(
' '.join(map(fmt_filter, self.filters)),