wallet: fix integrated node connection change

This commit is contained in:
ardocrat 2024-05-28 13:58:56 +03:00
parent 4775ae9279
commit fc98cb0fb7

View file

@ -106,17 +106,16 @@ impl ConnectionSetup {
self.ui(ui, frame, Some(wallet), cb); self.ui(ui, frame, Some(wallet), cb);
// Setup wallet connection value after change. // Setup wallet connection value after change.
let config = wallet.get_config();
let changed = match self.method { let changed = match self.method {
ConnectionMethod::Integrated => { ConnectionMethod::Integrated => {
let changed = config.ext_conn_id.is_some(); let changed = wallet.get_current_ext_conn().is_some();
if changed { if changed {
wallet.update_ext_conn_id(None); wallet.update_ext_conn_id(None);
} }
changed changed
} }
ConnectionMethod::External(id) => { ConnectionMethod::External(id) => {
let changed = config.ext_conn_id != Some(id); let changed = wallet.get_config().ext_conn_id != Some(id);
if changed { if changed {
wallet.update_ext_conn_id(Some(id)); wallet.update_ext_conn_id(Some(id));
} }