mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-21 17:18:43 +02:00
Make balance display more concise
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "utils/config.h"
|
||||
#include "utils/tails.h"
|
||||
#include "utils/whonix.h"
|
||||
#include "globals.h"
|
||||
|
||||
// Application log for current session
|
||||
QVector<logMessage> applicationLog = QVector<logMessage>(); // todo: replace with ring buffer
|
||||
@@ -532,3 +533,12 @@ int Utils::maxLength(const QVector<QString> &array) {
|
||||
}
|
||||
return maxLength;
|
||||
}
|
||||
|
||||
QString Utils::balanceFormat(quint64 balance) {
|
||||
QString str = QString::number(balance / globals::cdiv, 'f', 4);
|
||||
|
||||
str.remove(QRegExp("0+$"));
|
||||
str.remove(QRegExp("\\.$"));
|
||||
|
||||
return str;
|
||||
}
|
||||
Reference in New Issue
Block a user