mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 16:29:29 +02:00
fix credit amount in window title
This commit is contained in:
parent
45ab8145a4
commit
714e29c887
3 changed files with 4 additions and 3 deletions
|
@ -887,7 +887,7 @@ QJsonObject DomainServer::jsonObjectForNode(const SharedNodePointer& node) {
|
||||||
float pendingCreditAmount = 0;
|
float pendingCreditAmount = 0;
|
||||||
|
|
||||||
while (i != _pendingAssignmentCredits.end() && i.key() == nodeData->getWalletUUID()) {
|
while (i != _pendingAssignmentCredits.end() && i.key() == nodeData->getWalletUUID()) {
|
||||||
pendingCreditAmount += i.value()->getAmount() / (float) SATOSHIS_PER_CREDIT;
|
pendingCreditAmount += i.value()->getAmount() / SATOSHIS_PER_CREDIT;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3108,7 +3108,8 @@ void Application::updateWindowTitle(){
|
||||||
|
|
||||||
AccountManager& accountManager = AccountManager::getInstance();
|
AccountManager& accountManager = AccountManager::getInstance();
|
||||||
if (accountManager.getAccountInfo().hasBalance()) {
|
if (accountManager.getAccountInfo().hasBalance()) {
|
||||||
float creditBalance = accountManager.getAccountInfo().getBalance() / (float) SATOSHIS_PER_CREDIT;
|
qDebug() << accountManager.getAccountInfo().getBalance();
|
||||||
|
float creditBalance = accountManager.getAccountInfo().getBalance() / SATOSHIS_PER_CREDIT;
|
||||||
|
|
||||||
QString creditBalanceString;
|
QString creditBalanceString;
|
||||||
creditBalanceString.sprintf("%.8f", creditBalance);
|
creditBalanceString.sprintf("%.8f", creditBalance);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "OAuthAccessToken.h"
|
#include "OAuthAccessToken.h"
|
||||||
|
|
||||||
const float SATOSHIS_PER_CREDIT = 10.0e8f;
|
const float SATOSHIS_PER_CREDIT = 10000000.0f;
|
||||||
|
|
||||||
class DataServerAccountInfo : public QObject {
|
class DataServerAccountInfo : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
Loading…
Reference in a new issue