Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodel.cpp
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
Amount WalletModel::getWatchImmatureBalance() const { | Amount WalletModel::getWatchImmatureBalance() const { | ||||
return wallet->GetImmatureWatchOnlyBalance(); | return wallet->GetImmatureWatchOnlyBalance(); | ||||
} | } | ||||
void WalletModel::updateStatus() { | void WalletModel::updateStatus() { | ||||
EncryptionStatus newEncryptionStatus = getEncryptionStatus(); | EncryptionStatus newEncryptionStatus = getEncryptionStatus(); | ||||
if (cachedEncryptionStatus != newEncryptionStatus) { | if (cachedEncryptionStatus != newEncryptionStatus) { | ||||
Q_EMIT encryptionStatusChanged(newEncryptionStatus); | Q_EMIT encryptionStatusChanged(); | ||||
} | } | ||||
} | } | ||||
void WalletModel::pollBalanceChanged() { | void WalletModel::pollBalanceChanged() { | ||||
// Get required locks upfront. This avoids the GUI from getting stuck on | // Get required locks upfront. This avoids the GUI from getting stuck on | ||||
// periodical polls if the core is holding the locks for a longer time - for | // periodical polls if the core is holding the locks for a longer time - for | ||||
// example, during a wallet rescan. | // example, during a wallet rescan. | ||||
TRY_LOCK(cs_main, lockMain); | TRY_LOCK(cs_main, lockMain); | ||||
▲ Show 20 Lines • Show All 601 Lines • ▼ Show 20 Lines | |||||
bool WalletModel::hdEnabled() const { | bool WalletModel::hdEnabled() const { | ||||
return wallet->IsHDEnabled(); | return wallet->IsHDEnabled(); | ||||
} | } | ||||
int WalletModel::getDefaultConfirmTarget() const { | int WalletModel::getDefaultConfirmTarget() const { | ||||
return nTxConfirmTarget; | return nTxConfirmTarget; | ||||
} | } | ||||
QString WalletModel::getWalletName() const { | |||||
LOCK(wallet->cs_wallet); | |||||
return QString::fromStdString(wallet->GetName()); | |||||
} | |||||
bool WalletModel::isMultiwallet() { | |||||
return gArgs.GetArgs("-wallet").size() > 1; | |||||
} | |||||
const CChainParams &WalletModel::getChainParams() const { | const CChainParams &WalletModel::getChainParams() const { | ||||
return wallet->chainParams; | return wallet->chainParams; | ||||
} | } |