X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Fwalletmodel.cpp;h=faf5049ead72976ab0d5ee6d62dc1d2fcec39b18;hb=f8ea0dd6459856f2df18ca2ad532d49432a087dd;hp=a185ed3cf4ed586e7f186e826f998b9d3759ab10;hpb=d4488b9d263e4799f7bb4a1aaa1f692aa995f517;p=novacoin.git diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index a185ed3..faf5049 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -207,7 +207,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QListcs_wallet); - std::map::iterator mi = wallet->mapAddressBook.find(dest); + std::map::iterator mi = wallet->mapAddressBook.find(addr); // Check if we have a new address or an updated label if (mi == wallet->mapAddressBook.end() || mi->second != strLabel) { - wallet->SetAddressBookName(dest, strLabel); + wallet->SetAddressBookName(addr, strLabel); } } } @@ -359,11 +359,11 @@ static void NotifyKeyStoreStatusChanged(WalletModel *walletmodel, CCryptoKeyStor QMetaObject::invokeMethod(walletmodel, "updateStatus", Qt::QueuedConnection); } -static void NotifyAddressBookChanged(WalletModel *walletmodel, CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, ChangeType status) +static void NotifyAddressBookChanged(WalletModel *walletmodel, CWallet *wallet, const CBitcoinAddress &address, const std::string &label, bool isMine, ChangeType status) { - OutputDebugStringF("NotifyAddressBookChanged %s %s isMine=%i status=%i\n", CBitcoinAddress(address).ToString().c_str(), label.c_str(), isMine, status); + OutputDebugStringF("NotifyAddressBookChanged %s %s isMine=%i status=%i\n", address.ToString().c_str(), label.c_str(), isMine, status); QMetaObject::invokeMethod(walletmodel, "updateAddressBook", Qt::QueuedConnection, - Q_ARG(QString, QString::fromStdString(CBitcoinAddress(address).ToString())), + Q_ARG(QString, QString::fromStdString(address.ToString())), Q_ARG(QString, QString::fromStdString(label)), Q_ARG(bool, isMine), Q_ARG(int, status)); @@ -496,7 +496,7 @@ void WalletModel::listCoins(std::map >& mapCoins) } CBitcoinAddress addressRet; - if(!out.fSpendable || !wallet->ExtractAddress(cout.tx->vout[cout.i].scriptPubKey, addressRet)) + if(!out.fSpendable || !ExtractAddress(*wallet, cout.tx->vout[cout.i].scriptPubKey, addressRet)) continue; mapCoins[addressRet.ToString().c_str()].push_back(out); @@ -531,4 +531,4 @@ void WalletModel::clearOrphans() CWallet* WalletModel::getWallet() { return wallet; -} \ No newline at end of file +}