1
0

config: abstract away mempool depth format str "%.1f MB from tip"

related: 4dd94172a6
(as that commit introduced depth targets that need more precision to display)
This commit is contained in:
SomberNight
2022-03-31 22:50:31 +02:00
parent 2b13576eb3
commit 7268fa55f2
4 changed files with 14 additions and 5 deletions

View File

@@ -125,6 +125,7 @@ class TxDialog(Factory.Popup):
self.app = app # type: ElectrumWindow
self.wallet = self.app.wallet
self.tx = tx # type: Transaction
self.config = self.app.electrum_config
# If the wallet can populate the inputs with more info, do it now.
# As a result, e.g. we might learn an imported address tx is segwit,
@@ -154,7 +155,7 @@ class TxDialog(Factory.Popup):
self.date_str = datetime.fromtimestamp(tx_mined_status.timestamp).isoformat(' ')[:-3]
elif exp_n is not None:
self.date_label = _('Mempool depth')
self.date_str = _('{} from tip').format('%.2f MB'%(exp_n/1000000))
self.date_str = self.config.depth_tooltip(exp_n)
else:
self.date_label = ''
self.date_str = ''