1
0

simplify exchange_rate hooks

This commit is contained in:
ThomasV
2015-10-17 06:26:37 +02:00
parent 46249f74d3
commit 302ce7c15b
3 changed files with 8 additions and 15 deletions

View File

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