#include "guiconstants.h"
#include "optionsmodel.h"
#include "addresstablemodel.h"
+#include "mintingtablemodel.h"
#include "transactiontablemodel.h"
#include "ui_interface.h"
cachedNumBlocks(0)
{
addressTableModel = new AddressTableModel(wallet, this);
+ mintingTableModel = new MintingTableModel(wallet, this);
transactionTableModel = new TransactionTableModel(wallet, this);
// This timer will be fired repeatedly to update the balance
return wallet->GetBalance();
}
+qint64 WalletModel::getBalanceWatchOnly() const
+{
+ return wallet->GetWatchOnlyBalance();
+}
+
qint64 WalletModel::getUnconfirmedBalance() const
{
return wallet->GetUnconfirmedBalance();
void WalletModel::checkBalanceChanged()
{
- qint64 newBalance = getBalance();
+ qint64 newBalanceTotal=getBalance(), newBalanceWatchOnly=getBalanceWatchOnly();
qint64 newStake = getStake();
qint64 newUnconfirmedBalance = getUnconfirmedBalance();
qint64 newImmatureBalance = getImmatureBalance();
- if(cachedBalance != newBalance || cachedStake != newStake || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance)
+ if(cachedBalance != newBalanceTotal || cachedStake != newStake || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance)
{
- cachedBalance = newBalance;
+ cachedBalance = newBalanceTotal;
cachedStake = newStake;
cachedUnconfirmedBalance = newUnconfirmedBalance;
cachedImmatureBalance = newImmatureBalance;
- emit balanceChanged(newBalance, newStake, newUnconfirmedBalance, newImmatureBalance);
+ emit balanceChanged(newBalanceTotal, newBalanceWatchOnly, newStake, newUnconfirmedBalance, newImmatureBalance);
}
}
return addressTableModel;
}
+MintingTableModel *WalletModel::getMintingTableModel()
+{
+ return mintingTableModel;
+}
+
TransactionTableModel *WalletModel::getTransactionTableModel()
{
return transactionTableModel;
return retval;
}
-void WalletModel::getStakeWeight(uint64& nMinWeight, uint64& nMaxWeight, uint64& nWeight)
+void WalletModel::getStakeStats(float &nKernelsRate, float &nCoinDaysRate)
{
- wallet->GetStakeWeight(*wallet, nMinWeight, nMaxWeight, nWeight);
+ wallet->GetStakeStats(nKernelsRate, nCoinDaysRate);
}
void WalletModel::getStakeWeightFromValue(const int64& nTime, const int64& nValue, uint64& nWeight)
{
return;
}
+
+void WalletModel::clearOrphans()
+{
+ wallet->ClearOrphans();
+}
+
+CWallet* WalletModel::getWallet()
+{
+ return wallet;
+}
\ No newline at end of file