foreach(const SendCoinsRecipient &rcp, recipients)
{
CScript scriptPubKey;
- scriptPubKey.SetDestination(CBitcoinAddress(rcp.address.toStdString()).Get());
+ scriptPubKey.SetAddress(CBitcoinAddress(rcp.address.toStdString()));
vecSend.push_back(make_pair(scriptPubKey, rcp.amount));
}
}
else
{
- // Decrypt -- TODO; not supported yet
- return false;
+ // Decrypt
+ return wallet->DecryptWallet(passphrase);
}
}
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);
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);
}
}
CWallet* WalletModel::getWallet()
{
return wallet;
-}
\ No newline at end of file
+}