simplify exchange_rate hooks
This commit is contained in:
@@ -492,7 +492,7 @@ class ElectrumWindow(QMainWindow, PrintError):
|
||||
text = self.format_amount(amount) + ' '+ self.base_unit()
|
||||
x = run_hook('format_amount_and_units', amount)
|
||||
if x:
|
||||
text += ''.join(x)
|
||||
text += x
|
||||
return text
|
||||
|
||||
def get_decimal_point(self):
|
||||
@@ -536,9 +536,9 @@ class ElectrumWindow(QMainWindow, PrintError):
|
||||
if x:
|
||||
text += " [%s unmatured]"%(self.format_amount(x, True).strip())
|
||||
# append fiat balance and price from exchange rate plugin
|
||||
r = {'text': ''}
|
||||
run_hook('get_fiat_status_text', c + u + x, r)
|
||||
text += r['text']
|
||||
rate = run_hook('get_fiat_status_text', c + u + x)
|
||||
if rate:
|
||||
text += "1 BTC~%s" % rate
|
||||
icon = QIcon(":icons/status_connected.png")
|
||||
else:
|
||||
text = _("Not connected")
|
||||
|
||||
Reference in New Issue
Block a user