diff --git a/src/monero_wallet_wrapper/MoneroWallet.cc b/src/monero_wallet_wrapper/MoneroWallet.cc index c9815c5cc..2a58c5135 100644 --- a/src/monero_wallet_wrapper/MoneroWallet.cc +++ b/src/monero_wallet_wrapper/MoneroWallet.cc @@ -57,12 +57,12 @@ public: } virtual void on_money_received(uint64_t height, const cryptonote::transaction& tx, size_t out_index) { - observer->on_money_received(height, tx.vout[out_index].amount); + observer->on_money_received(height, epee::string_tools::pod_to_hex(cryptonote::get_transaction_hash(tx)), tx.vout[out_index].amount); } virtual void on_money_spent(uint64_t height, const cryptonote::transaction& in_tx, size_t out_index, const cryptonote::transaction& spend_tx) { // std::cout << "Impl observer : " << "on_money_spent" << std::endl; - observer->on_money_spent(height, in_tx.vout[out_index].amount); + observer->on_money_spent(height, epee::string_tools::pod_to_hex(cryptonote::get_transaction_hash(spend_tx)), in_tx.vout[out_index].amount); } diff --git a/src/monero_wallet_wrapper/MoneroWalletObserver.hh b/src/monero_wallet_wrapper/MoneroWalletObserver.hh index e1412f90a..eaa1cf2a7 100644 --- a/src/monero_wallet_wrapper/MoneroWalletObserver.hh +++ b/src/monero_wallet_wrapper/MoneroWalletObserver.hh @@ -11,9 +11,9 @@ public: virtual void on_new_block(uint64_t height) = 0; - virtual void on_money_received(uint64_t height, Monero::amount_mini_t amount_mini) = 0; + virtual void on_money_received(uint64_t height, const std::string& transaction_id, Monero::amount_mini_t amount_mini) = 0; - virtual void on_money_spent(uint64_t height, Monero::amount_mini_t amount_mini) = 0; + virtual void on_money_spent(uint64_t height, const std::string& transaction_id, Monero::amount_mini_t amount_mini) = 0; virtual void on_skip_transaction(uint64_t height, const std::string& transaction_id) = 0;