Browse Source

tw.view: display Seed ID if applicable

The MMGen Project 1 week ago
parent
commit
0ae18743c9
2 changed files with 7 additions and 0 deletions
  1. 4 0
      mmgen/proto/xmr/tw/view.py
  2. 3 0
      mmgen/tw/view.py

+ 4 - 0
mmgen/proto/xmr/tw/view.py

@@ -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():

+ 3 - 0
mmgen/tw/view.py

@@ -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)),