aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/address_book.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-05 19:11:20 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-05 19:11:20 +0200
commit4f93f745284c10f12e2524f5211030085d9626cf (patch)
tree29b5f359a8f346305bcf7bf82f459f421bfaa7a7 /src/wallet/api/address_book.cpp
parentMerge pull request #3273 (diff)
parentWallet API: generalize 'bool testnet' to 'NetworkType nettype' (diff)
downloadmonero-4f93f745284c10f12e2524f5211030085d9626cf.tar.xz
Merge pull request #3277
0e7ad2e2 Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (stoffu) af773211 Stagenet (stoffu) cc9a0bee command_line: allow args to depend on more than one args (stoffu) 55f8d917 command_line::get_arg: remove 'required' for dependent args as they're always optional (stoffu) 450306a0 command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 (stoffu) 9f9e095a Use `genesis_tx` parameter in `generate_genesis_block`. #3261 (Jean Pierre Dudey)
Diffstat (limited to 'src/wallet/api/address_book.cpp')
-rw-r--r--src/wallet/api/address_book.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/api/address_book.cpp b/src/wallet/api/address_book.cpp
index 38c34a912..7ef011e06 100644
--- a/src/wallet/api/address_book.cpp
+++ b/src/wallet/api/address_book.cpp
@@ -49,7 +49,7 @@ bool AddressBookImpl::addRow(const std::string &dst_addr , const std::string &pa
clearStatus();
cryptonote::address_parse_info info;
- if(!cryptonote::get_account_address_from_str(info, m_wallet->m_wallet->testnet(), dst_addr)) {
+ if(!cryptonote::get_account_address_from_str(info, m_wallet->m_wallet->nettype(), dst_addr)) {
m_errorString = tr("Invalid destination address");
m_errorCode = Invalid_Address;
return false;
@@ -105,13 +105,13 @@ void AddressBookImpl::refresh()
tools::wallet2::address_book_row * row = &rows.at(i);
std::string payment_id = (row->m_payment_id == crypto::null_hash)? "" : epee::string_tools::pod_to_hex(row->m_payment_id);
- std::string address = cryptonote::get_account_address_as_str(m_wallet->m_wallet->testnet(), row->m_is_subaddress, row->m_address);
+ std::string address = cryptonote::get_account_address_as_str(m_wallet->m_wallet->nettype(), row->m_is_subaddress, row->m_address);
// convert the zero padded short payment id to integrated address
if (!row->m_is_subaddress && payment_id.length() > 16 && payment_id.substr(16).find_first_not_of('0') == std::string::npos) {
payment_id = payment_id.substr(0,16);
crypto::hash8 payment_id_short;
if(tools::wallet2::parse_short_payment_id(payment_id, payment_id_short)) {
- address = cryptonote::get_account_integrated_address_as_str(m_wallet->m_wallet->testnet(), row->m_address, payment_id_short);
+ address = cryptonote::get_account_integrated_address_as_str(m_wallet->m_wallet->nettype(), row->m_address, payment_id_short);
// Don't show payment id when integrated address is used
payment_id = "";
}