From a4a078335134394deb2c48e32d96a4150f53f659 Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 14 Jan 2021 21:17:13 -0500 Subject: [PATCH] update sample code --- README.md | 4 ++-- test/sample_code.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ff99508..888d031 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ struct : monero_wallet_listener { bool is_locked = dynamic_pointer_cast(output.m_tx)->m_is_locked.get(); int account_index = output.m_account_index.get(); int subaddress_index = output.m_subaddress_index.get(); - OUTPUT_RECEIVED = true; + FUNDS_RECEIVED = true; } } my_listener; wallet_random->add_listener(my_listener); @@ -119,7 +119,7 @@ struct : monero_wallet_listener { string tx_hash = output.m_tx->m_hash.get(); int account_index = output.m_account_index.get(); int subaddress_index = output.m_subaddress_index.get(); - OUTPUT_RECEIVED = true; + FUNDS_RECEIVED = true; } } my_listener; wallet_random->add_listener(my_listener); diff --git a/test/sample_code.cpp b/test/sample_code.cpp index 452685d..263941b 100644 --- a/test/sample_code.cpp +++ b/test/sample_code.cpp @@ -5,7 +5,7 @@ using namespace std; -bool OUTPUT_RECEIVED = false; +bool FUNDS_RECEIVED = false; /** * This code introduces the API. @@ -103,7 +103,7 @@ int main(int argc, const char* argv[]) { bool is_locked = static_pointer_cast(output.m_tx)->m_is_locked.get(); int account_index = output.m_account_index.get(); int subaddress_index = output.m_subaddress_index.get(); - OUTPUT_RECEIVED = true; + FUNDS_RECEIVED = true; } } my_listener; wallet_random->add_listener(my_listener); @@ -148,7 +148,7 @@ int main(int argc, const char* argv[]) { wallet_restored->relay_tx(*created_tx); // recipient receives notification within 5 seconds // the recipient wallet will be notified - if (OUTPUT_RECEIVED) cout << "Sample code completed successfully" << endl; + if (FUNDS_RECEIVED) cout << "Sample code completed successfully" << endl; else throw runtime_error("Output should have been received"); // save and close the wallets