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

@@ -476,8 +476,10 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
self.date_label.setText(_("Date: {}").format(time_str))
self.date_label.show()
elif exp_n is not None:
text = '%.2f MB'%(exp_n/1000000)
self.date_label.setText(_('Position in mempool: {} from tip').format(text))
text = "{}: {}".format(
_('Position in mempool'),
self.config.depth_tooltip(exp_n))
self.date_label.setText(text)
self.date_label.show()
else:
self.date_label.hide()