peerplays_migrated/programs/light_client/Balance.cpp

17 lines
367 B
C++
Raw Normal View History

#include "Balance.hpp"
#include "Asset.hpp"
#include <graphene/chain/account_object.hpp>
qreal Balance::amountReal() const {
return amount / qreal(m_type->precisionPower());
}
void Balance::update(const graphene::chain::account_balance_object& update)
{
if (update.balance != amount) {
amount = update.balance.value;
emit amountChanged();
}
}