From 97c2e449ce97be1150f088fd0ec83213cf43a7f9 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sat, 5 Aug 2017 17:01:50 +0200 Subject: wallet2+API: use separate callbacks for lightwallets --- src/wallet/wallet2.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/wallet/wallet2.cpp') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 4d3445e94..b0ce28b9b 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1857,8 +1857,7 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re if(m_light_wallet_blockchain_height != prev_height) { MDEBUG("new block since last time!"); - cryptonote::block dummy; - m_callback->on_new_block(m_light_wallet_blockchain_height - 1, dummy); + m_callback->on_lw_new_block(m_light_wallet_blockchain_height - 1); } m_light_wallet_connected = true; MDEBUG("lw scanned block height: " << m_light_wallet_scanned_block_height); @@ -5119,16 +5118,14 @@ void wallet2::light_wallet_get_address_txs() pool_txs.push_back(tx_hash); m_unconfirmed_payments.emplace(tx_hash, payment); if (0 != m_callback) { - cryptonote::transaction dummy_tx; - m_callback->on_unconfirmed_money_received(t.height, payment.m_tx_hash, dummy_tx, payment.m_amount); + m_callback->on_lw_unconfirmed_money_received(t.height, payment.m_tx_hash, payment.m_amount); } } } else { if (std::find(payments_txs.begin(), payments_txs.end(), tx_hash) == payments_txs.end()) { m_payments.emplace(tx_hash, payment); if (0 != m_callback) { - cryptonote::transaction dummy_tx; - m_callback->on_money_received(t.height, payment.m_tx_hash, dummy_tx, payment.m_amount); + m_callback->on_lw_money_received(t.height, payment.m_tx_hash, payment.m_amount); } } } @@ -5178,7 +5175,7 @@ void wallet2::light_wallet_get_address_txs() } if (0 != m_callback) { - m_callback->on_money_spent(t.height, tx_hash, dummy_tx, amount_sent, dummy_tx); + m_callback->on_lw_money_spent(t.height, tx_hash, amount_sent); } } // If not new - check the amount and update if necessary. -- cgit v1.2.3