diff --git a/src/gui/views/wallets/wallet/content.rs b/src/gui/views/wallets/wallet/content.rs index bfb456c..6a2ef73 100644 --- a/src/gui/views/wallets/wallet/content.rs +++ b/src/gui/views/wallets/wallet/content.rs @@ -83,9 +83,10 @@ impl WalletContent { let data = wallet.get_data(); let data_empty = data.is_none(); - // Show wallet balance panel when there is no error and data is not empty. + // Show wallet balance panel not on Settings tab, when wallet is not repairing, + // there is no error and data is not empty. let show_balance = self.current_tab.get_type() != WalletTabType::Settings && !data_empty - && !wallet.sync_error(); + && !wallet.sync_error() && !wallet.is_repairing(); egui::TopBottomPanel::top("wallet_balance") .frame(egui::Frame { fill: Colors::FILL, diff --git a/src/gui/views/wallets/wallet/transport.rs b/src/gui/views/wallets/wallet/transport.rs index fd5cd5a..e245b3b 100644 --- a/src/gui/views/wallets/wallet/transport.rs +++ b/src/gui/views/wallets/wallet/transport.rs @@ -197,7 +197,7 @@ impl WalletTransport { } // Draw send content. - if data.info.amount_currently_spendable > 0 { + if data.info.amount_currently_spendable > 0 && wallet.foreign_api_port().is_some() { self.tor_send_ui(ui, cb); } } @@ -229,9 +229,8 @@ impl WalletTransport { // Draw button to enable/disable Tor listener for current wallet. let service_id = &wallet.identifier(); - if !Tor::is_service_starting(service_id) { - if !Tor::is_service_running(service_id) && - wallet.foreign_api_port().is_some() { + if !Tor::is_service_starting(service_id) && wallet.foreign_api_port().is_some() { + if !Tor::is_service_running(service_id) { View::item_button(ui, Rounding::default(), POWER, Some(Colors::GREEN), || { if let Ok(key) = wallet.secret_key() { let api_port = wallet.foreign_api_port().unwrap(); @@ -272,7 +271,8 @@ impl WalletTransport { // Setup Tor status text. let is_running = Tor::is_service_running(service_id); - let is_starting = Tor::is_service_starting(service_id); + let is_starting = Tor::is_service_starting(service_id) || + wallet.foreign_api_port().is_none(); let has_error = Tor::is_service_failed(service_id); let (icon, text) = if is_starting { (DOTS_THREE_CIRCLE, t!("transport.connecting")) @@ -499,7 +499,8 @@ impl WalletTransport { ui.add_space(3.0); // Show wallet Slatepack address. - let address_color = if Tor::is_service_starting(service_id) { + let address_color = if Tor::is_service_starting(service_id) || + wallet.foreign_api_port().is_none() { Colors::INACTIVE_TEXT } else if Tor::is_service_running(service_id) { Colors::GREEN diff --git a/src/gui/views/wallets/wallet/txs.rs b/src/gui/views/wallets/wallet/txs.rs index 5a27700..d908b8a 100644 --- a/src/gui/views/wallets/wallet/txs.rs +++ b/src/gui/views/wallets/wallet/txs.rs @@ -191,7 +191,6 @@ impl WalletTransactions { } let refresh_resp = PullToRefresh::new(syncing && self.manual_sync) .min_refresh_distance(70.0) - .can_refresh(!wallet.syncing()) .scroll_area_ui(ui, |ui| { ScrollArea::vertical() .id_source(Id::from("txs_content").with(wallet.get_config().id)) @@ -213,8 +212,10 @@ impl WalletTransactions { // Sync wallet on refresh. if refresh_resp.should_refresh() { - wallet.sync(true); self.manual_sync = true; + if !wallet.syncing() { + wallet.sync(true); + } } } diff --git a/src/wallet/wallet.rs b/src/wallet/wallet.rs index bd374a3..c8bd8c7 100644 --- a/src/wallet/wallet.rs +++ b/src/wallet/wallet.rs @@ -1164,8 +1164,8 @@ fn sync_wallet_data(wallet: &Wallet, from_node: bool) { from_node, config.min_confirmations ) { - // Do not retrieve txs if wallet was closed. - if !wallet.is_open() { + // Do not retrieve txs if wallet was closed or its first sync from local database. + if !wallet.is_open() || !from_node && info.1.last_confirmed_height == 0 { return; }