Last active
July 16, 2022 13:59
-
-
Save stoffu/bcdbc0067f9a9b03571c3c901661470f to your computer and use it in GitHub Desktop.
address_book.cpp: empty all functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- address_book.cpp 2022-07-16 22:55:13.000000000 +0900 | |
+++ address_book.new.cpp 2022-07-16 22:58:29.000000000 +0900 | |
@@ -49,7 +49,7 @@ | |
clearStatus(); | |
cryptonote::address_parse_info info; | |
- if(!cryptonote::get_account_address_from_str(info, m_wallet->m_wallet->nettype(), dst_addr)) { | |
+ if(!cryptonote::get_account_address_from_str(info, MAINNET/*m_wallet->m_wallet->nettype()*/, dst_addr)) { | |
m_errorString = tr("Invalid destination address"); | |
m_errorCode = Invalid_Address; | |
return false; | |
@@ -85,7 +85,7 @@ | |
memcpy(payment_id.data, info.payment_id.data, 8); | |
} | |
- bool r = m_wallet->m_wallet->add_address_book_row(info.address,payment_id,description,info.is_subaddress); | |
+ bool r = false;//m_wallet->m_wallet->add_address_book_row(info.address,payment_id,description,info.is_subaddress); | |
if (r) | |
refresh(); | |
else | |
@@ -100,18 +100,18 @@ | |
clearRows(); | |
// Fetch from Wallet2 and create vector of AddressBookRow objects | |
- std::vector<tools::wallet2::address_book_row> rows = m_wallet->m_wallet->get_address_book(); | |
+ std::vector<tools::wallet2::address_book_row> rows = {};//m_wallet->m_wallet->get_address_book(); | |
for (size_t i = 0; i < rows.size(); ++i) { | |
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->nettype(), row->m_is_subaddress, row->m_address); | |
+ std::string address = cryptonote::get_account_address_as_str(MAINNET/*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->nettype(), row->m_address, payment_id_short); | |
+ address = cryptonote::get_account_integrated_address_as_str(MAINNET/*m_wallet->m_wallet->nettype()*/, row->m_address, payment_id_short); | |
// Don't show payment id when integrated address is used | |
payment_id = ""; | |
} | |
@@ -125,7 +125,7 @@ | |
bool AddressBookImpl::deleteRow(std::size_t rowId) | |
{ | |
LOG_PRINT_L2("Deleting address book row " << rowId); | |
- bool r = m_wallet->m_wallet->delete_address_book_row(rowId); | |
+ bool r = false;//m_wallet->m_wallet->delete_address_book_row(rowId); | |
if (r) | |
refresh(); | |
return r; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment