Skip to content
Snippets Groups Projects
Commit 102f1a8c authored by inso's avatar inso
Browse files

Fix display of balance

parent 8a91aad6
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ import asyncio ...@@ -3,7 +3,7 @@ import asyncio
class Quantitative(): class Quantitative():
_NAME_STR_ = QT_TRANSLATE_NOOP('Quantitative', 'Units') _NAME_STR_ = QT_TRANSLATE_NOOP('Quantitative', 'Units')
_REF_STR_ = QT_TRANSLATE_NOOP('Quantitative', "{0} {1}") _REF_STR_ = QT_TRANSLATE_NOOP('Quantitative', "{0} {1}{2}")
_UNITS_STR_ = QT_TRANSLATE_NOOP('Quantitative', "{0}") _UNITS_STR_ = QT_TRANSLATE_NOOP('Quantitative', "{0}")
def __init__(self, amount, community, app): def __init__(self, amount, community, app):
......
...@@ -34,10 +34,12 @@ class CommunityTile(QFrame): ...@@ -34,10 +34,12 @@ class CommunityTile(QFrame):
members_pubkeys = yield from self.community.members_pubkeys() members_pubkeys = yield from self.community.members_pubkeys()
amount = yield from self.app.current_account.amount(self.community) amount = yield from self.app.current_account.amount(self.community)
localized_amount = yield from self.app.current_account.current_ref(amount, localized_amount = yield from self.app.current_account.current_ref(amount,
self.community, self.app).localized(units=True) self.community, self.app).localized(units=True,
international_system=self.app.preferences['international_system_of_units'])
if current_block['monetaryMass']: if current_block['monetaryMass']:
localized_monetary_mass = yield from self.app.current_account.current_ref(current_block['monetaryMass'], localized_monetary_mass = yield from self.app.current_account.current_ref(current_block['monetaryMass'],
self.community, self.app).localized(units=True) self.community, self.app).localized(units=True,
international_system=self.app.preferences['international_system_of_units'])
else: else:
localized_monetary_mass = "" localized_monetary_mass = ""
status = self.tr("Member") if self.app.current_account.pubkey in members_pubkeys \ status = self.tr("Member") if self.app.current_account.pubkey in members_pubkeys \
......
...@@ -119,7 +119,8 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget): ...@@ -119,7 +119,8 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget):
def refresh_balance(self): def refresh_balance(self):
amount = yield from self.app.current_account.amount(self.community) amount = yield from self.app.current_account.amount(self.community)
localized_amount = yield from self.app.current_account.current_ref(amount, self.community, localized_amount = yield from self.app.current_account.current_ref(amount, self.community,
self.app).localized(units=True) self.app).localized(units=True,
international_system=self.app.preferences['international_system_of_units'])
# set infos in label # set infos in label
self.label_balance.setText( self.label_balance.setText(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment