api/wallet: fix compile errors made in #4720

This commit is contained in:
stoffu 2018-11-07 15:09:43 +09:00
parent a9e03ebc6a
commit ba2055a220
No known key found for this signature in database
GPG key ID: 41DAB8343A9EC012

View file

@ -507,7 +507,7 @@ bool WalletImpl::createWatchOnly(const std::string &path, const std::string &pas
auto key_images = m_wallet->export_key_images(); auto key_images = m_wallet->export_key_images();
uint64_t spent = 0; uint64_t spent = 0;
uint64_t unspent = 0; uint64_t unspent = 0;
view_wallet->import_key_images(key_images,spent,unspent,false); view_wallet->import_key_images(key_images.second, key_images.first, spent, unspent, false);
clearStatus(); clearStatus();
} catch (const std::exception &e) { } catch (const std::exception &e) {
LOG_ERROR("Error creating view only wallet: " << e.what()); LOG_ERROR("Error creating view only wallet: " << e.what());
@ -1051,8 +1051,8 @@ UnsignedTransaction *WalletImpl::loadUnsignedTx(const std::string &unsigned_file
// Check tx data and construct confirmation message // Check tx data and construct confirmation message
std::string extra_message; std::string extra_message;
if (!transaction->m_unsigned_tx_set.transfers.empty()) if (!transaction->m_unsigned_tx_set.transfers.second.empty())
extra_message = (boost::format("%u outputs to import. ") % (unsigned)transaction->m_unsigned_tx_set.transfers.size()).str(); extra_message = (boost::format("%u outputs to import. ") % (unsigned)transaction->m_unsigned_tx_set.transfers.second.size()).str();
transaction->checkLoadedTx([&transaction](){return transaction->m_unsigned_tx_set.txes.size();}, [&transaction](size_t n)->const tools::wallet2::tx_construction_data&{return transaction->m_unsigned_tx_set.txes[n];}, extra_message); transaction->checkLoadedTx([&transaction](){return transaction->m_unsigned_tx_set.txes.size();}, [&transaction](size_t n)->const tools::wallet2::tx_construction_data&{return transaction->m_unsigned_tx_set.txes[n];}, extra_message);
setStatus(transaction->status(), transaction->errorString()); setStatus(transaction->status(), transaction->errorString());