diff --git a/src/wallet/wallet.rs b/src/wallet/wallet.rs index f19311d..e8ba71f 100644 --- a/src/wallet/wallet.rs +++ b/src/wallet/wallet.rs @@ -1184,6 +1184,15 @@ fn sync_wallet_data(wallet: &Wallet, from_node: bool) { } } + // Setup accounts data. + let last_height = info.1.last_confirmed_height; + let spendable = if wallet.get_data().is_none() { + None + } else { + Some(info.1.amount_currently_spendable) + }; + update_accounts(wallet, last_height, spendable); + // Update wallet info. { let mut w_data = wallet.data.write(); @@ -1195,15 +1204,6 @@ fn sync_wallet_data(wallet: &Wallet, from_node: bool) { *w_data = Some(WalletData { info: info.1.clone(), txs }); } - // Setup accounts data. - let last_height = info.1.last_confirmed_height; - let spendable = if wallet.get_data().is_none() { - None - } else { - Some(info.1.amount_currently_spendable) - }; - update_accounts(wallet, last_height, spendable); - // Update txs sync progress at separate thread. let wallet_txs = wallet.clone(); let (txs_tx, txs_rx) = mpsc::channel::();