aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-08-05 17:01:50 +0200
committerJaquee <jaquee.monero@gmail.com>2017-10-15 17:58:28 +0200
commit97c2e449ce97be1150f088fd0ec83213cf43a7f9 (patch)
tree146f7b78e3c78f687091f912581a8e29b0f7b249 /src/wallet/wallet2.cpp
parentwalletAPI: correct confirmations in txHistory for unsynced wallets (diff)
downloadmonero-97c2e449ce97be1150f088fd0ec83213cf43a7f9.tar.xz
wallet2+API: use separate callbacks for lightwallets
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp11
1 files changed, 4 insertions, 7 deletions
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.