From 196860801853d418916736addca081105b1afe0e Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Tue, 22 Oct 2024 14:46:28 +0400 Subject: [PATCH] fix for android --- src/currency_core/currency_format_utils.h | 2 ++ src/wallet/wallet2.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/currency_core/currency_format_utils.h b/src/currency_core/currency_format_utils.h index 2fab77e1..c8fe36a1 100644 --- a/src/currency_core/currency_format_utils.h +++ b/src/currency_core/currency_format_utils.h @@ -950,6 +950,7 @@ namespace currency } } } + /* //--------------------------------------------------------------- template typename std::enable_if_t, std::ostream&> operator<<(std::ostream& o, invocable_t callee) @@ -957,6 +958,7 @@ namespace currency callee(o); return o; } + */ //--------------------------------------------------------------- std::ostream& operator <<(std::ostream& o, const ref_by_id& r); std::ostream& operator <<(std::ostream& o, const std::type_info& ti); diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index f4b203ad..c9765b93 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -397,8 +397,10 @@ const crypto::public_key& wallet2::out_get_pub_key(const currency::tx_out_v& out //---------------------------------------------------------------------------------------------------- void wallet2::process_ado_in_new_transaction(const currency::asset_descriptor_operation& ado, process_transaction_context& ptc) { - auto print_ado_owner = [ado](std::ostream& o){ + auto print_ado_owner = [ado](/*std::ostream& o*/) { + std::stringstream o; ado.descriptor.owner_eth_pub_key.has_value() ? o << ado.descriptor.owner_eth_pub_key.value() << " (ETH)" : o << ado.descriptor.owner; + return o.str(); }; do @@ -424,7 +426,7 @@ void wallet2::process_ado_in_new_transaction(const currency::asset_descriptor_op std::stringstream ss; ss << "New Asset Registered:" << ENDL << "asset id: " << asset_id - << ENDL << "Owner: " << print_ado_owner + << ENDL << "Owner: " << print_ado_owner() << ENDL << "Name: " << asset_context.full_name << ENDL << "Ticker: " << asset_context.ticker << ENDL << "Total Max Supply: " << print_asset_money(asset_context.total_max_supply, asset_context.decimal_point) @@ -492,7 +494,7 @@ void wallet2::process_ado_in_new_transaction(const currency::asset_descriptor_op std::stringstream ss; ss << "Asset ownership lost:" << ENDL << "asset id: " << asset_id - << ENDL << "New owner: " << print_ado_owner + << ENDL << "New owner: " << print_ado_owner() << ENDL << "Name: " << ado.descriptor.full_name << ENDL << "Ticker: " << ado.descriptor.ticker << ENDL << "Total Max Supply: " << print_asset_money(ado.descriptor.total_max_supply, ado.descriptor.decimal_point)