@@ -633,8 +633,9 @@ pub(crate) async fn handle_online_wallet_subcommand(
633633 client
634634 . populate_tx_cache ( wallet. tx_graph ( ) . full_txs ( ) . map ( |tx_node| tx_node. tx ) ) ;
635635
636- let update = client. full_scan ( request, _stop_gap, * batch_size, false ) ?;
637- wallet. apply_update ( update) ?;
636+ let update = client. full_scan ( request, _stop_gap, batch_size, false ) ?;
637+ let wallet_events = wallet. apply_update_events ( update) ?;
638+ print_wallet_events ( & wallet_events) ;
638639 }
639640 #[ cfg( feature = "esplora" ) ]
640641 Esplora {
@@ -645,7 +646,8 @@ pub(crate) async fn handle_online_wallet_subcommand(
645646 . full_scan ( request, _stop_gap, * parallel_requests)
646647 . await
647648 . map_err ( |e| * e) ?;
648- wallet. apply_update ( update) ?;
649+ let wallet_events = wallet. apply_update_events ( update) ?;
650+ print_wallet_events ( & wallet_events) ;
649651 }
650652
651653 #[ cfg( feature = "rpc" ) ]
@@ -1535,10 +1537,12 @@ pub async fn sync_wallet(client: &BlockchainClient, wallet: &mut Wallet) -> Resu
15351537 // already have.
15361538 client. populate_tx_cache ( wallet. tx_graph ( ) . full_txs ( ) . map ( |tx_node| tx_node. tx ) ) ;
15371539
1538- let update = client. sync ( request, * batch_size, false ) ?;
1539- wallet
1540- . apply_update ( update)
1541- . map_err ( |e| Error :: Generic ( e. to_string ( ) ) )
1540+ let update = client. sync ( request, batch_size, false ) ?;
1541+ let wallet_events = wallet
1542+ . apply_update_events ( update)
1543+ . map_err ( |e| Error :: Generic ( e. to_string ( ) ) ) ?;
1544+ print_wallet_events ( & wallet_events) ;
1545+ Ok ( ( ) )
15421546 }
15431547 #[ cfg( feature = "esplora" ) ]
15441548 Esplora {
@@ -1549,9 +1553,11 @@ pub async fn sync_wallet(client: &BlockchainClient, wallet: &mut Wallet) -> Resu
15491553 . sync ( request, * parallel_requests)
15501554 . await
15511555 . map_err ( |e| * e) ?;
1552- wallet
1553- . apply_update ( update)
1554- . map_err ( |e| Error :: Generic ( e. to_string ( ) ) )
1556+ let wallet_events = wallet
1557+ . apply_update_events ( update)
1558+ . map_err ( |e| Error :: Generic ( e. to_string ( ) ) ) ?;
1559+ print_wallet_events ( & wallet_events) ;
1560+ Ok ( ( ) )
15551561 }
15561562 #[ cfg( feature = "rpc" ) ]
15571563 RpcClient { client } => {
0 commit comments