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

Fix display of balance

parent 8a91aad6
Branches
Tags
No related merge requests found
......@@ -3,7 +3,7 @@ import asyncio
class Quantitative():
_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}")
def __init__(self, amount, community, app):
......
......@@ -34,10 +34,12 @@ class CommunityTile(QFrame):
members_pubkeys = yield from self.community.members_pubkeys()
amount = yield from self.app.current_account.amount(self.community)
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']:
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:
localized_monetary_mass = ""
status = self.tr("Member") if self.app.current_account.pubkey in members_pubkeys \
......
......@@ -119,7 +119,8 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget):
def refresh_balance(self):
amount = yield from self.app.current_account.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
self.label_balance.setText(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment