mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-03 09:29:37 +00:00
account: fix balance order
This commit is contained in:
parent
744c892ba0
commit
f8a3df1489
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,8 @@
|
|||
#include <QFont>
|
||||
#include "utils/Utils.h"
|
||||
|
||||
#include "libwalletqt/WalletManager.h"
|
||||
|
||||
SubaddressAccountModel::SubaddressAccountModel(QObject *parent, SubaddressAccount *subaddressAccount)
|
||||
: QAbstractTableModel(parent)
|
||||
, m_subaddressAccount(subaddressAccount)
|
||||
|
@ -84,8 +86,14 @@ QVariant SubaddressAccountModel::parseSubaddressAccountRow(const Monero::Subaddr
|
|||
case Label:
|
||||
return QString::fromStdString(row.getLabel());
|
||||
case Balance:
|
||||
if (role == Qt::UserRole) {
|
||||
return WalletManager::amountFromString(QString::fromStdString(row.getBalance()));
|
||||
}
|
||||
return QString::fromStdString(row.getBalance());
|
||||
case UnlockedBalance:
|
||||
if (role == Qt::UserRole) {
|
||||
return WalletManager::amountFromString(QString::fromStdString(row.getUnlockedBalance()));
|
||||
}
|
||||
return QString::fromStdString(row.getUnlockedBalance());
|
||||
default:
|
||||
return QVariant();
|
||||
|
|
Loading…
Reference in a new issue