X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Fwalletmodel.cpp;h=a185ed3cf4ed586e7f186e826f998b9d3759ab10;hb=d4488b9d263e4799f7bb4a1aaa1f692aa995f517;hp=2f2ccab584df25228ae9e3c35fc95e244c5e7ae6;hpb=56e46b89aac57a230e343181b464b9d59e494e5d;p=novacoin.git diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 2f2ccab..a185ed3 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -302,8 +302,8 @@ bool WalletModel::setWalletEncrypted(bool encrypted, const SecureString &passphr } else { - // Decrypt -- TODO; not supported yet - return false; + // Decrypt + return wallet->DecryptWallet(passphrase); } } @@ -332,11 +332,6 @@ bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureStri return retval; } -void WalletModel::getStakeStats(float &nKernelsRate, float &nCoinDaysRate) -{ - wallet->GetStakeStats(nKernelsRate, nCoinDaysRate); -} - void WalletModel::getStakeWeightFromValue(const int64_t& nTime, const int64_t& nValue, uint64_t& nWeight) { wallet->GetStakeWeightFromValue(nTime, nValue, nWeight); @@ -500,10 +495,11 @@ void WalletModel::listCoins(std::map >& mapCoins) cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0, true); } - CTxDestination address; - if(!out.fSpendable || !ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address)) + CBitcoinAddress addressRet; + if(!out.fSpendable || !wallet->ExtractAddress(cout.tx->vout[cout.i].scriptPubKey, addressRet)) continue; - mapCoins[CBitcoinAddress(address).ToString().c_str()].push_back(out); + + mapCoins[addressRet.ToString().c_str()].push_back(out); } }