return retval;
}
+void WalletModel::getStakeWeight(uint64& nMinWeight, uint64& nMaxWeight, uint64& nWeight)
+{
+ wallet->GetStakeWeight(*wallet, nMinWeight, nMaxWeight, nWeight);
+}
+
+void WalletModel::getStakeWeightFromValue(const int64& nTime, const int64& nValue, uint64& nWeight)
+{
+ wallet->GetStakeWeightFromValue(nTime, nValue, nWeight);
+}
+
+bool WalletModel::dumpWallet(const QString &filename)
+{
+ return DumpWallet(wallet, filename.toLocal8Bit().data());
+}
+
+bool WalletModel::importWallet(const QString &filename)
+{
+ return ImportWallet(wallet, filename.toLocal8Bit().data());
+}
+
bool WalletModel::backupWallet(const QString &filename)
{
return BackupWallet(*wallet, filename.toLocal8Bit().data());
WalletModel::UnlockContext WalletModel::requestUnlock()
{
bool was_locked = getEncryptionStatus() == Locked;
+
+ if ((!was_locked) && fWalletUnlockMintOnly)
+ {
+ setWalletLocked(true);
+ was_locked = getEncryptionStatus() == Locked;
+
+ }
if(was_locked)
{
// Request UI to unlock wallet
// If wallet is still locked, unlock was failed or cancelled, mark context as invalid
bool valid = getEncryptionStatus() != Locked;
- return UnlockContext(this, valid, was_locked);
+ return UnlockContext(this, valid, was_locked && !fWalletUnlockMintOnly);
}
WalletModel::UnlockContext::UnlockContext(WalletModel *wallet, bool valid, bool relock):